'Is it safe to add ProtoIncludes to an abstract class in Protobuf-net, after the datamodel has already been deployed?
I'm trying to make a data model extensible after deployment. Is the following acceptable:
[ProtoContract]
[ProtoInclude(1, typeof(ProtoObject<float>))]
[ProtoInclude(2, typeof(ProtoObject<int>))]
[ProtoInclude(3, typeof(ProtoObject<bool>))]
[ProtoInclude(4, typeof(ProtoObject<string>))]
///CAN I ADD A NEW ProtoInclude(5, typeof(ProtoObject<NEWTYPE>))] HERE AFTER I HAVE ALREADY DEPLOYED???
public abstract class ProtoObject
{
protected ProtoObject() { }
public abstract object ProtoValue { get; set; }
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
