I am trying to understand protobuf-net's Dictionary/KeyValuePair support. We would like to use the underlying binary stream and the generated proto file from java, but the generated .proto file contains what look like a custom type called Pair_String_Int32.
Can someone please shed some light on this?
I've got a class mapped like this:
[DataContract]
public class ForwardCurve
{
[DataMember(Order=1, IsRequired = true)]
public string Commodity { get; set; }
[DataMember(Order = 2, IsRequired = false)]
public IDictionary<string, int> DictValue { get; set; }
[DataMember(Order = 3, IsRequired = false)]
public IList<string> ListValue { get; set; }
}
The generated .proto file using Serializer.GetProto will be:
message ForwardCurve {
required string Commodity = 1;
repeated Pair_String_Int32 DictValue = 2;
repeated string ListValue = 3;
}
So what is Pair_String_Int32 (and what is going into the protobuffer byte stream) and is there any way of mapping this so that protobuf, by using protoc can create the equivalent mapping code in Java?