Class OneofAccessor

public sealed class OneofAccessor : object

Reflection access for a oneof, allowing clear and "get case" actions.

Inheritance

Object > OneofAccessor

Namespace

Google.Protobuf.Reflection

Assembly

Google.Protobuf.dll

Properties

Descriptor

public OneofDescriptor Descriptor { get; }

Gets the descriptor for this oneof.

Property Value
TypeDescription
OneofDescriptor

The descriptor of the oneof.

Methods

Clear(IMessage)

public void Clear(IMessage message)

Clears the oneof in the specified message.

Parameter
TypeNameDescription
IMessagemessage

GetCaseFieldDescriptor(IMessage)

public FieldDescriptor GetCaseFieldDescriptor(IMessage message)

Indicates which field in the oneof is set for specified message

Parameter
TypeNameDescription
IMessagemessage
Returns
TypeDescription
FieldDescriptor