Last active
September 3, 2018 11:24
-
-
Save mgravell/a33755800e823ee77ba01183be7084df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ProtoContract(Name = "MSG1")] | |
[ProtoInclude(3, typeof(Message2))] | |
class Message1 | |
{ | |
[ProtoMember(1, Name = "account", IsRequired = true)] | |
public string Account { get; set; } | |
[ProtoMember(2, Name = "symbol", IsRequired = true)] | |
public string Symbol { get; set; } | |
} | |
[ProtoContract(Name = "MSG2")] | |
class Message2 : Message1 | |
{ | |
[ProtoMember(2, Name = "id", IsRequired = true)] | |
public int Id { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto2"; | |
message MSG1 { | |
required string account = 1; | |
required string symbol = 2; | |
oneof subtype { | |
MSG2 MSG2 = 3; | |
} | |
} | |
message MSG2 { | |
required int32 id = 2; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
message MSG1 { | |
string account = 1; | |
string symbol = 2; | |
oneof subtype { | |
MSG2 MSG2 = 3; | |
} | |
} | |
message MSG2 { | |
int32 id = 2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment