ProtoInclude adds unwanted dependencies

I just replaced the .NET serialization with protocol buffers in a distributed cache application, and the results are really impressive. The only thing I don't like is the fact that I need to add dependencies between the base class of the message and its children, which creates a circular dependency. Is there an alternative to the base class method with ProtoInclude?

+4
source share
1 answer

In v1; [ProtoInclude]is the only way to support inheritance.

In v2, you can use a method MetaType .AddSubType(...)to achieve the same goal without requiring your base type to know about the derived type.

+5
source

All Articles