How can I Generate a .proto file from a C# class.
My C# class code contains more than 3000 lines of code .
.so wanted to see is there any easy way to do this ..convert C# (.cs) files to .proto file.
What I have tried:
Basically, given:
message person {
option (my_message_option) = true;
optional string firstname = 1 [(my_field_option) = 42];
optional string lastname = 2 [(my_field_option) = 12];
optional int age = 3;
}
I want to generate:
[ProtoContract, MyMessageOption(true)]
public class Person
{
[ProtoMember(1), MyFieldOption(42)]
public string Firstname;
[ProtoMember(2), MyFieldOption(12)]
public string Firstname;
[ProtoMember(3)]
public string Firstname;
}