webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
Google.Protobuf.Reflection.FileDescriptor Class Reference

Describes a .proto file, including everything defined within. IDescriptor is implemented such that the File property returns this descriptor, and the FullName is the same as the Name. More...

Inheritance diagram for Google.Protobuf.Reflection.FileDescriptor:
Google.Protobuf.Reflection.IDescriptor

Public Member Functions

T FindTypeByName< T > (String name)
 Finds a type (message, enum, service or extension) in the file by name. Does not find nested types. More...
 
override string ToString ()
 Returns a System.String that represents this instance. More...
 

Static Public Member Functions

static FileDescriptor FromGeneratedCode (byte[] descriptorData, FileDescriptor[] dependencies, GeneratedClrTypeInfo generatedCodeInfo)
 Creates a descriptor for generated code. More...
 

Public Attributes

string Name => Proto.Name
 
string Package => Proto.Package
 The package as declared in the .proto file. This may or may not be equivalent to the .NET namespace of the generated classes. More...
 

Properties

IList< MessageDescriptorMessageTypes [get]
 
IList< EnumDescriptorEnumTypes [get]
 
IList< ServiceDescriptorServices [get]
 
IList< FileDescriptorDependencies [get]
 
IList< FileDescriptorPublicDependencies [get]
 
ByteString SerializedData [get]
 
static FileDescriptor DescriptorProtoFileDescriptor [get]
 Returns the file descriptor for descriptor.proto. More...
 
- Properties inherited from Google.Protobuf.Reflection.IDescriptor
string Name [get]
 Returns the name of the entity (message, field etc) being described. More...
 
string FullName [get]
 Returns the fully-qualified name of the entity being described. More...
 
FileDescriptor File [get]
 Returns the descriptor for the .proto file that this entity is part of. More...
 

Detailed Description

Describes a .proto file, including everything defined within. IDescriptor is implemented such that the File property returns this descriptor, and the FullName is the same as the Name.

Member Function Documentation

◆ FindTypeByName< T >()

T Google.Protobuf.Reflection.FileDescriptor.FindTypeByName< T > ( String  name)
inline

Finds a type (message, enum, service or extension) in the file by name. Does not find nested types.

Parameters
nameThe unqualified type name to look for.
Template Parameters
TThe type of descriptor to look for
Returns
The type's descriptor, or null if not found.
Type Constraints
T :class 
T :IDescriptor 

◆ FromGeneratedCode()

static FileDescriptor Google.Protobuf.Reflection.FileDescriptor.FromGeneratedCode ( byte []  descriptorData,
FileDescriptor []  dependencies,
GeneratedClrTypeInfo  generatedCodeInfo 
)
inlinestatic

Creates a descriptor for generated code.

This method is only designed to be used by the results of generating code with protoc, which creates the appropriate dependencies etc. It has to be public because the generated code is "external", but should not be called directly by end users.

◆ ToString()

override string Google.Protobuf.Reflection.FileDescriptor.ToString ( )
inline

Returns a System.String that represents this instance.

Returns
A System.String that represents this instance.

Member Data Documentation

◆ Name

string Google.Protobuf.Reflection.FileDescriptor.Name => Proto.Name

The file name.

◆ Package

string Google.Protobuf.Reflection.FileDescriptor.Package => Proto.Package

The package as declared in the .proto file. This may or may not be equivalent to the .NET namespace of the generated classes.

Property Documentation

◆ Dependencies

IList<FileDescriptor> Google.Protobuf.Reflection.FileDescriptor.Dependencies
get

Unmodifiable list of this file's dependencies (imports).

◆ DescriptorProtoFileDescriptor

FileDescriptor Google.Protobuf.Reflection.FileDescriptor.DescriptorProtoFileDescriptor
staticget

Returns the file descriptor for descriptor.proto.

This is used for protos which take a direct dependency on descriptor.proto, typically for annotations. While descriptor.proto is a proto2 file, it is built into the Google.Protobuf runtime for reflection purposes. The messages are internal to the runtime as they would require proto2 semantics for full support, but the file descriptor is available via this property. The C# codegen in protoc automatically uses this property when it detects a dependency on descriptor.proto.

The file descriptor for descriptor.proto.

◆ EnumTypes

IList<EnumDescriptor> Google.Protobuf.Reflection.FileDescriptor.EnumTypes
get

Unmodifiable list of top-level enum types declared in this file.

◆ MessageTypes

IList<MessageDescriptor> Google.Protobuf.Reflection.FileDescriptor.MessageTypes
get

Unmodifiable list of top-level message types declared in this file.

◆ PublicDependencies

IList<FileDescriptor> Google.Protobuf.Reflection.FileDescriptor.PublicDependencies
get

Unmodifiable list of this file's public dependencies (public imports).

◆ SerializedData

ByteString Google.Protobuf.Reflection.FileDescriptor.SerializedData
get

The original serialized binary form of this descriptor.

◆ Services

IList<ServiceDescriptor> Google.Protobuf.Reflection.FileDescriptor.Services
get

Unmodifiable list of top-level services declared in this file.


The documentation for this class was generated from the following file: