Some breaking changes were required to fix some issues introduced by the use of nullable reference types. The most painful is probably the change in session data semantics: whereas in EmbedIO version 3 the ISession[] getter returned null for non-existent keys, now session data behave as a "real" dictionary, thus throwing KeyNotFoundException.
Unfortunately there was no way around it any longer (or should I say, we stopped getting away with such bad practice) the day IDictionary<,> and IReadOnlyDictionary<,> got their nullability annotations, breaking Swan.Collections.IDataDictionary<,> beyond repair.
Another relevant breaking change is that RouteMatcher.Match does not return null any more if a match fails: instead, it returns RouteMatch.None. Instead of checking for a null return value, users of RouteMatcher can use the newly-introduced RouteMatch.IsMatch property to determine whether a match was successful.
Other breaking changes were mostly at a binary level, only requiring recompilation of dependent projects.
This PR also marks the point in history when there are no more compiler warnings in EmbedIO - except for legacy code ported from Mono and WebSocketSharp, and the Security namespace that is going to be refactored anyway.
Some breaking changes were required to fix some issues introduced by the use of nullable reference types. The most painful is probably the change in session data semantics: whereas in EmbedIO version 3 the
ISession[]
getter returnednull
for non-existent keys, now session data behave as a "real" dictionary, thus throwingKeyNotFoundException
.Unfortunately there was no way around it any longer (or should I say, we stopped getting away with such bad practice) the day
IDictionary<,>
andIReadOnlyDictionary<,>
got their nullability annotations, breakingSwan.Collections.IDataDictionary<,>
beyond repair.Another relevant breaking change is that
RouteMatcher.Match
does not returnnull
any more if a match fails: instead, it returnsRouteMatch.None
. Instead of checking for anull
return value, users ofRouteMatcher
can use the newly-introducedRouteMatch.IsMatch
property to determine whether a match was successful.Other breaking changes were mostly at a binary level, only requiring recompilation of dependent projects.
This PR also marks the point in history when there are no more compiler warnings in EmbedIO - except for legacy code ported from Mono and WebSocketSharp, and the Security namespace that is going to be refactored anyway.