Closed kevmal closed 9 years ago
Thanks,
I wasn't aware of this interface so I started reading through it. I found that it is being used in a variety of different ways, some of which seem a bit contradicting: for example
I need to figure out the canonical (i.e. most common) way this is being used.
This has been fixed as of FsPickler 1.0.19.
Awesome. Did a quick test and seems to be working great. My use case was actually closer to the second link you posted, the MSDN page just seemed like the simplest example.
The exception message is "is ISerializable but does not implement constructor with parameters (SerializationInfo, StreamingContext)." But in the case of a singleton this is expected. SetType is used on SerializationInfo to set a IObjectReference helper type which contains the required constructor.
For example: https://msdn.microsoft.com/en-us/library/system.runtime.serialization.iobjectreference%28v=vs.110%29.aspx