Reputation: 11284
In C# using protobuf-net, I would like to keep my protobuf definition in the .proto file. (it's used to generate code for other languages, ...)
I know that the Google's implementation of protoc will not generate any Map's in the Java generated code.
However, since protobuf-net supports Dictionaries if I generate the .proto from the .cs file, I was wondering if it also supported them going from .proto to .cs file.
eg, in the .proto file I have:
message KeyValuePair_String_String {
optional string Key = 1;
optional string Value = 2;
}
Is it possible to pass any argument to the protobuf-net C# protogen.exe compiler so that it creates Dictionaries instead of Lists?
Thanks, rui
Upvotes: 2
Views: 410