Re: [protobuf] generate .proto file from C# code

2016-09-12 Thread Marc Gravell
That output is from protobuf-net, not protoc. I already showed the code to ask protobuf-net to have a go at writing a .proto schema from a type. Note that it is not perfect and you may want to tweak names etc to match convention. But names don't matter much to protobuf. On 12 Sep 2016 1:59 pm,

Re: [protobuf] generate .proto file from C# code

2016-09-12 Thread Gayatri Shah
Thank you Marc. Do you have sample of .proto file? What did you have to do to make it compile? I just wrote few lines of .proto file and I m using *protoc-3.0.0-win32.zip for compiler? Can you also give me ur

Re: [protobuf] generate .proto file from C# code

2016-09-09 Thread Marc Gravell
You'd be best off creating it by hand, but if you want a starting point, you can use protobuf-net to get some hints; add [ProtoContract(ImplicitFields = ImplicitFields.AllPublic)] to your root type (UAVState?), and use something like Console.WriteLine(Serializer.GetProto()); to see the content. I

[protobuf] generate .proto file from C# code

2016-09-09 Thread Gayatri Shah
I am new to Protocol buffer. I have huge file that is in C# and I want to convert that to protocol buffer definition. How do I do that? Do i need to write Protocol definition line by line? See attached file (Anything marked as non-serialized could be omitted; pretty much anything that’s