rui
rui

Reputation: 11284

Does protobuf-net support Dictionary when it goes from .proto file to the .cs file? (via protogen.exe)

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

Answers (1)

Marc Gravell
Marc Gravell

Reputation: 1062955

The short answer is: Not currently.

Upvotes: 2

Related Questions