Class DescriptorBase
Base class for nearly all descriptors, providing common functionality.
Inheritance
Implements
Inherited Members
Namespace: Google.Protobuf.Reflection
Assembly: Google.Protobuf.dll
Syntax
public abstract class DescriptorBase : IDescriptor
Properties
Declaration
The declaration information about the descriptor, or null if no declaration information is available for this descriptor.
Declaration
public DescriptorDeclaration Declaration { get; }
Property Value
Type | Description |
---|---|
DescriptorDeclaration |
Remarks
This information is typically only available for dynamically loaded descriptors, for example within a protoc plugin where the full descriptors, including source info, are passed to the code by protoc.
File
Declaration
public FileDescriptor File { get; }
Property Value
Type | Description |
---|---|
FileDescriptor | The file this descriptor was declared in. |
Implements
FullName
The fully qualified name of the descriptor's target.
Declaration
public string FullName { get; }
Property Value
Type | Description |
---|---|
System.String |
Implements
Index
Declaration
public int Index { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The index of this descriptor within its parent descriptor. |
Remarks
This returns the index of this descriptor within its parent, for this descriptor's type. (There can be duplicate values for different types, e.g. one enum type with index 0 and one message type with index 0.)
Name
Returns the name of the entity (field, message etc) being described.
Declaration
public abstract string Name { get; }
Property Value
Type | Description |
---|---|
System.String |