I encountered a, at least to my expectations, strange behavior in the binary serialization of .NET.
All items of a Dictionary
that are loaded are added
Interesting... for info, I tried it with the attribute-based approach (below), and it behaves the same... very curious! I can't explain it - I'm just replying to confirm reproduced, and to mention the [OnDeserialized]
behaviour:
[OnDeserialized] // note still not added yet...
private void OnDeserialized(StreamingContext context) {...}
Edit - found "connect" issue here. Try adding to your callback:
Dictionary.OnDeserialization(this);