You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IF YOU DON'T ANSWER THIS TEMPLATE - THE BOT WILL AUTOMATICALLY CLOSE YOUR ISSUE!
Please check all of the platforms you are having the issue on (if platform is not listed, it is not supported)
WPF
UWP
iOS
Android
.NET Standard
.NET Core
Component
Catel.Collections.FastObservableDictionary
Version of Library
5.12.10
Version of OS(s) listed above with issue
Windows 10 20H2
Steps to Reproduce
Create a new FastObservableDictionary<> collection that supports nullable values (e.g. string)
Attempt to add an item to the collection with a null value (e.g. dict.Add("key1", null);)
Expected Behavior
The item key1 with a value of null should add to the collection
Actual Behavior
The exception ArgumentNullException is thrown because newValue is null. The behavior of FastObservableDictionary should follow the pattern of all derivatives of Dictionary in that only the key is not allowed to be null. It should be up to the caller/implementer to restrict that behavior.
I unfortunately do not have the bandwidth to absorb this right now.
The text was updated successfully, but these errors were encountered:
GeertvanHorrik
changed the title
FastObservableDictionary Throws ArgumentNullException for Values
FastObservableDictionary should allow null-values and not throw ArgumentNullException
Nov 20, 2020
IF YOU DON'T ANSWER THIS TEMPLATE - THE BOT WILL AUTOMATICALLY CLOSE YOUR ISSUE!
Please check all of the platforms you are having the issue on (if platform is not listed, it is not supported)
Component
Catel.Collections.FastObservableDictionary
Version of Library
5.12.10
Version of OS(s) listed above with issue
Windows 10 20H2
Steps to Reproduce
FastObservableDictionary<>
collection that supports nullable values (e.g.string
)dict.Add("key1", null);
)Expected Behavior
The item
key1
with a value ofnull
should add to the collectionActual Behavior
The exception
ArgumentNullException
is thrown becausenewValue
is null. The behavior ofFastObservableDictionary
should follow the pattern of all derivatives ofDictionary
in that only the key is not allowed to be null. It should be up to the caller/implementer to restrict that behavior.I unfortunately do not have the bandwidth to absorb this right now.
The text was updated successfully, but these errors were encountered: