【问题标题】:Does protobuf-net support Dictionary when it goes from .proto file to the .cs file? (via protogen.exe)protobuf-net 从 .proto 文件到 .cs 文件时是否支持 Dictionary? (通过 protogen.exe)
【发布时间】:2013-06-17 18:00:54
【问题描述】:

在使用 protobuf-net 的 C# 中,我想将我的 protobuf 定义保留在 .proto 文件中。 (它用于为其他语言生成代码,...)

我知道 Google 的 protoc 实现不会在 Java 生成的代码中生成任何 Map。

但是,如果我从 .cs 文件生成 .proto,protobuf-net 支持字典,我想知道它是否也支持从 .proto.cs 文件。

例如,在 .proto 文件中我有:

message KeyValuePair_String_String {
   optional string Key = 1;
   optional string Value = 2;
}

是否可以将任何参数传递给 protobuf-net C# protogen.exe 编译器,以便它创建字典而不是列表?

谢谢, 瑞

【问题讨论】:

    标签: c# protocol-buffers protobuf-net


    【解决方案1】:

    简短的回答是:目前没有。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多