Descriptor for an enum type in a .proto file.
Properties |
|
---|---|
ClrType
|
Type
The CLR type for this enum.
|
ContainingType
|
If this is a nested type, get the outer descriptor, otherwise null.
|
Name
|
override string
The brief name of the descriptor's target.
|
Proto
|
EnumDescriptorProto
|
Values
|
IList< EnumValueDescriptor >
An unmodifiable list of defined value descriptors for this enum.
|
Public functions |
|
---|---|
FindValueByName(string name)
|
Finds an enum value by name.
|
FindValueByNumber(int number)
|
Finds an enum value by number.
|
Type ClrType
The CLR type for this enum.
For generated code, this will be a CLR enum type.
MessageDescriptor ContainingType
If this is a nested type, get the outer descriptor, otherwise null.
override string Name
The brief name of the descriptor's target.
EnumDescriptorProto Proto
IList< EnumValueDescriptor > Values
An unmodifiable list of defined value descriptors for this enum.
EnumValueDescriptor FindValueByName( string name )
Finds an enum value by name.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The value's descriptor, or null if not found.
|
EnumValueDescriptor FindValueByNumber( int number )
Finds an enum value by number.
If multiple enum values have the same number, this returns the first defined value with that number. If there is no value for the given number, this returns null
.