I'm trying to figure out how to initialize a protocol buffer that has
another message nested inside of it. Below is the proto code and the
SetExtension() Declarations.
message Base {
extensions 100 to max;
}
message ExtMsg1 {
optional bool p1 = 1;
}
message ExtMsg2 {
required int32 p1 = 1;
}
extend Base {
optional ExtMsg1 extmsg1 = 100;
optional ExtMsg2 extmsg2 = 101;
}
public TBuilder
SetExtension<TExtension>(GeneratedExtensionLite<TMessage, TExtension>
extension, TExtension value);
public TBuilder
SetExtension<TExtension>(GeneratedExtensionLite<TMessage,
IList<TExtension>> extension, int index, TExtension value);
I'm a new to C# and am still learning the syntax. Does anyone know the
proper syntax for creating a Base message with a nested message?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/protobuf/-/OKAe1iYKNxYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en.