public sealed class OneofAccessor : object
Reflection access for a oneof, allowing clear and "get case" actions.
Namespace
Google.Protobuf.ReflectionAssembly
Google.Protobuf.dll
Properties
Descriptor
public OneofDescriptor Descriptor { get; }
Gets the descriptor for this oneof.
Property Value | |
---|---|
Type | Description |
OneofDescriptor | The descriptor of the oneof. |
Methods
Clear(IMessage)
public void Clear(IMessage message)
Clears the oneof in the specified message.
Parameter | |
---|---|
Name | Description |
message | IMessage |
GetCaseFieldDescriptor(IMessage)
public FieldDescriptor GetCaseFieldDescriptor(IMessage message)
Indicates which field in the oneof is set for specified message
Parameter | |
---|---|
Name | Description |
message | IMessage |
Returns | |
---|---|
Type | Description |
FieldDescriptor |