8

So having our classes with attributes in folder how to generate .proto markup files out from them (to get for example C++ code)?

Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900
myWallJSON
  • 9,110
  • 22
  • 78
  • 149

1 Answers1

8

By "classes with attributes", do you mean attributes suitable for protobuf-net? If so, protobuf-net has a GetProto method which will provide the schema based on a root type:

string proto = Serializer.GetProto<SomeType>();

Despite the rumors to the contrary, this method in v2 has been re-implemented for quite some time now.

Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900
  • As a matter of fact, you can use this now.. myProto = myModel.GetSchema(typeof(SomeType), ProtoSyntax.Proto3); – Assil Jan 18 '20 at 18:08