I had the below classes in the old version of my application.
FooBase.cs
[ProtoContract]
[ProtoInclude(1, typeof(Baz)]
[ProtoInclude(3, typeof(Qux)]
public abstract class FooBase
{
[ProtoMember(5)]
public int Bar { get; set;}
}
Baz.cs
[ProtoContract]
public class Baz : FooBase
{
[ProtoMember(1)]
public string Quux {get;set;}
}
Qux.cs
[ProtoContract]
public class Qux : FooBase
{
[ProtoMember(1)]
public string Corge {get;set;}
}
Now we have some data serialized using Protobuf.Net to Bar and Qux
Now, in the next version, we decided to make it possible to serialize to FooBase as well.
So, FooBase is no longer an abstract class.
I really want to rename FooBase to Foo
The question is,
If I rename FooBase to Foo,
Foo.cs
[ProtoContract]
[ProtoInclude(1, typeof(Baz)]
[ProtoInclude(3, typeof(Qux)]
public class Foo
{
[ProtoMember(5)]
public int Bar { get; set;}
}
Is it still possible to deserialize my old data to Baz and Qux?
I could not find any answer from the available documentation.