rongfengliang / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
Other
0 stars 0 forks source link

Documentation on generating .proto files #128

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There does not appear to be any documentation on how to generate proto files 
from existing code contracts. Am I missing something?

Original issue reported on code.google.com by richard....@gmail.com on 3 Aug 2010 at 8:32

GoogleCodeExporter commented 9 years ago
Richard, it may not me possible because C#/C++/Java classes can contain 
constructions that are not possible to define in .proto file. For example 
definition of service in .proto file assumes that each method will have one 
argument and returns another object. If I understood you correctly you want to 
"decompile" code contracts back into .proto file.

So I'm afraid you'll have to do it manually.

Original comment by rusl...@gmail.com on 4 Aug 2010 at 7:09

GoogleCodeExporter commented 9 years ago
I think I also picked some of this up on twitter? email? I forget; there *is* 
Serializer.GetProto<T>() which covers *simple* examples, but it cannot be 
guaranteed to  work for all scenarios. I can advise on some of the more complex 
translations.

Original comment by marc.gravell on 4 Aug 2010 at 7:07