pizheng/protobuf-net

Structs with ProtoAfterDeserialization methods will not serialize

Closed this issue · 0 comments

The following struct will not serialize:

[ProtoContract]
internal struct StructTest
{
    [ProtoAfterDeserialization]
    private void AfterDeserialize()
    { }
}

If I remove the [ProtoAfterDeserialization] attribute, it serializes just fine.

Serialization fails with the following exception:

Operation is not valid due to the current state of the object. (StructTest)

If you have questions, you can contact me at coldarn (at) gmail (dot) com

Original issue reported on code.google.com by cold...@gmail.com on 24 Jul 2011 at 9:12