myWallJSON
myWallJSON

Reputation: 9502

How to generate .proto files from Protocol Buffers .NET code?

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

Upvotes: 8

Views: 5057

Answers (1)

Marc Gravell
Marc Gravell

Reputation: 1062502

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.

Upvotes: 8

Related Questions