Show / Hide Table of Contents

Class OneofAccessor

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

Inheritance
System.Object
OneofAccessor
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Protobuf.Reflection
Assembly: Google.Protobuf.dll
Syntax
public sealed class OneofAccessor

Properties

Descriptor

Gets the descriptor for this oneof.

Declaration
public OneofDescriptor Descriptor { get; }
Property Value
Type Description
OneofDescriptor

The descriptor of the oneof.

Methods

Clear(IMessage)

Clears the oneof in the specified message.

Declaration
public void Clear(IMessage message)
Parameters
Type Name Description
IMessage message

GetCaseFieldDescriptor(IMessage)

Indicates which field in the oneof is set for specified message

Declaration
public FieldDescriptor GetCaseFieldDescriptor(IMessage message)
Parameters
Type Name Description
IMessage message
Returns
Type Description
FieldDescriptor
Back to top