Class EnumValueDescriptor
Descriptor for a single enum value within an enum in a .proto file.
Implements
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 EnumValueDescriptor : DescriptorBase, IDescriptor
Properties
CustomOptions
The (possibly empty) set of custom options for this enum value.
Declaration
[Obsolete("CustomOptions are obsolete. Use GetOption")]
public CustomOptions CustomOptions { get; }
Property Value
Type | Description |
---|---|
CustomOptions |
EnumDescriptor
Returns the enum descriptor that this value is part of.
Declaration
public EnumDescriptor EnumDescriptor { get; }
Property Value
Type | Description |
---|---|
EnumDescriptor |
Name
Returns the name of the enum value described by this object.
Declaration
public override string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Number
Returns the number associated with this enum value.
Declaration
public int Number { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
GetOption<T>(Extension<EnumValueOptions, T>)
Gets a single value enum value option for this descriptor
Declaration
public T GetOption<T>(Extension<EnumValueOptions, T> extension)
Parameters
Type | Name | Description |
---|---|---|
Extension<EnumValueOptions, T> | extension |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
GetOption<T>(RepeatedExtension<EnumValueOptions, T>)
Gets a repeated value enum value option for this descriptor
Declaration
public RepeatedField<T> GetOption<T>(RepeatedExtension<EnumValueOptions, T> extension)
Parameters
Type | Name | Description |
---|---|---|
RepeatedExtension<EnumValueOptions, T> | extension |
Returns
Type | Description |
---|---|
RepeatedField<T> |
Type Parameters
Name | Description |
---|---|
T |