public abstract class DescriptorBase : IDescriptor
Base class for nearly all descriptors, providing common functionality.
Implements
IDescriptorDerived Types
Namespace
Google.Protobuf.ReflectionAssembly
Google.Protobuf.dll
Properties
Declaration
public DescriptorDeclaration Declaration { get; }
The declaration information about the descriptor, or null if no declaration information is available for this descriptor.
Property Value | |
---|---|
Type | Description |
DescriptorDeclaration |
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
public FileDescriptor File { get; }
Property Value | |
---|---|
Type | Description |
FileDescriptor |
The file this descriptor was declared in. |
FullName
public string FullName { get; }
The fully qualified name of the descriptor's target.
Property Value | |
---|---|
Type | Description |
string |
Index
public int Index { get; }
Property Value | |
---|---|
Type | Description |
int |
The index of this descriptor within its parent descriptor. |
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
public abstract string Name { get; }
Returns the name of the entity (field, message etc) being described.
Property Value | |
---|---|
Type | Description |
string |