and it generate the following code which did not compile:
/// <summary>Takes the remaining content of the stream and deserialze it into the instance.</summary>
public static Test.Protocol.ProtocolVersion Deserialize(Stream stream, Test.Protocol.ProtocolVersion instance)
{
instance.Current = 2.0.0; <------- This should have been a string
instance.ServerSupported = 2.x;
while (true)
{
....
The default value was not wrapped with quotes, it was emitted bare.
Another problem is that the message class does not have the default value in it:
public partial class ProtocolVersion
{
/// <summary> The current version of this protocol</summary>
public string Current { get; set; }
}
In other languages when creating new instance of ProtocolVersion message and getting the value of Current it will return the default value.
I use it as a way of adding "constant" to the protocol buffer.
I've created a message with default value like so:
and it generate the following code which did not compile:
The default value was not wrapped with quotes, it was emitted bare.
Another problem is that the message class does not have the default value in it:
In other languages when creating new instance of ProtocolVersion message and getting the value of Current it will return the default value.
I use it as a way of adding "constant" to the protocol buffer.