Conerlius / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
Other
0 stars 0 forks source link

Structs with ProtoAfterDeserialization methods will not serialize #209

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
Thanks for the example - looks like a clear bug; I will investigate.

Original comment by marc.gravell on 25 Jul 2011 at 7:09

GoogleCodeExporter commented 8 years ago
Hey Mark.

A bit more data, if required - I have this issue too: when I run my test suite 
- the first test that uses proto fails with the above exception, and all the 
rest complete successfully.

Is there any timeframe for a fix, perchance?

Ariel

Original comment by arie...@gmail.com on 24 Nov 2011 at 5:37

GoogleCodeExporter commented 8 years ago
Would "next build" suffice? Committed r474

Original comment by marc.gravell on 25 Nov 2011 at 8:14