Works fine for me:
[ProtoContract]
public class Foo
{
[OnDeserialized]
internal void OnDeserializedMethod(StreamingContext context)
{
Console.WriteLine("OnDeserializedMethod");
}
[ProtoMember(1)]
public string Bar { get;set; }
static void Main()
{
var foo = new Foo { Bar = "abc" };
var clone = Serializer.DeepClone(foo);
Console.WriteLine(clone.Bar);
}
}
Output:
OnDeserializedMethod
abc
Can you be more specific? Perhaps showing a complete example that reproduces what you are seeing? Also: are you sure you are using protobuf-net? Some people get very confused between protobuf-net and protobuf-csharp-port. I cannot comment on what features the latter supports.