Class OneofAccessor (3.23.0)

public sealed class OneofAccessor

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