22得票2回答
谷歌Protobuf 3.0.0 C#程序集

在我们的项目中,我们成功地使用了Google Protobuf for C++。现在有一个需要将相同的*.proto文件编译以在C#代码中使用。我下载了最新的Protobuf version 3.0.0-alpha-3。它为C#提供了对proto2格式的支持,这对我来说已经足够了。我可以成功地...

13得票5回答
协议缓冲和枚举的组合?

这是我的原型文件:message MSG { required MsgCodes MsgCode = 1; optional int64 Serial = 2; // Unique ID number for this person. required int32 ...

12得票3回答
当使用protobuf时,如何将字符串转换为ByteString?

我想将一个字符串对象转换成ByteString。我尝试使用ByteString.CopyFrom()函数进行转换,但返回值始终是"{Google.ProtocolBuffers.ByteString}"。为什么?我应该怎么做? 我使用的函数如下。 结果

8得票2回答
如何在C#中为Protobuf的map<string, string>类型属性设置值

我有以下的protoc3消息: message LocalizedString { map&lt;string, string&gt; translations = 1 } 编译成C#后,我得到了以下自动生成的代码: using pb = global::Google.Protob...