I'm trying to generate a csharp (.cs) file from a .proto file. I've downloaded protobuf-net from github and built locally, so that I can use protogen to generate .cs files. My issue is that I want it in the format that previous versions of this API that had the output generated, so for instance the newly generated classes are not inheriting from ProtoBuf.IExtensible, whereas previous versions did inherit from ProtoBuf.IExtensible. For example protogen is generating:
[global::ProtoBuf.ProtoContract()]
public partial class ClientMsg
{
[global::ProtoBuf.ProtoMember(100)]
public Logon logon { get; set; }
...
}
where what I'd like is something like:
[global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"ClientMsg")]
public partial class ClientMsg : global::ProtoBuf.IExtensible
{
public ClientMsg() {}
private WebAPI_1.Logon _logon = null;
[global::ProtoBuf.ProtoMember(100, IsRequired = false, Name=@"logon", DataFormat = global::ProtoBuf.DataFormat.Default)]
[global::System.ComponentModel.DefaultValue(null)]
public WebAPI_1.Logon logon
{
get { return _logon; }
set { _logon = value; }
}
...
}