Class OneofAccessor (3.15.8)

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
NameDescription
messageIMessage

GetCaseFieldDescriptor(IMessage)

public FieldDescriptor GetCaseFieldDescriptor(IMessage message)

Indicates which field in the oneof is set for specified message

Parameter
NameDescription
messageIMessage
Returns
TypeDescription
FieldDescriptor