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