Open GoogleCodeExporter opened 9 years ago
typo error:
throws on the ReadObject call.
LatestProductResponse lpr2 = serializerResponse.ReadObject(ms) as
LatestProductResponse;
Original comment by ghst...@gmail.com
on 15 Sep 2009 at 7:50
Original comment by marc.gravell
on 29 Jan 2010 at 8:27
It still angers me that someone at MS decided that DataContractSerializers
would not
call the constructor or property initializers prior to deserialization... seems
pretty lame.
MS was nice enough to give you an OnDeserializing method that can be used to
solve
this without breaking the readonly lists:
[OnDeserializing]
private void OnDeserializing(StreamingContext context)
{
_url = new global::System.Collections.Generic.List<ProductDownloadUrl>();
}
Obviously, all repeated (list) properties would need to be initialized in the
OnDeserializing method...
Original comment by scoo...@gmail.com
on 2 Apr 2010 at 4:52
Original issue reported on code.google.com by
ghst...@gmail.com
on 15 Sep 2009 at 7:25