Google.Protobuf.Reflection.FileDescriptor
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.
Returns the file descriptor for descriptor.proto.
The (possibly empty) set of custom options for this file.
Unmodifiable list of top-level extensions declared in this file.
Note that some extensions may be incomplete (FieldDescriptor.Extension may be null)
if this descriptor was generated using a version of protoc that did not fully
support extensions in C#.
The package as declared in the .proto file. This may or may not
be equivalent to the .NET namespace of the generated classes.
The syntax of the file.
public static IReadOnlyList<FileDescriptor> BuildFromByteStrings(IEnumerable<ByteString> descriptorData, ExtensionRegistry registry)
Converts the given descriptor binary data into FileDescriptor objects.
Note: reflection using the returned FileDescriptors is not currently supported.
public static IReadOnlyList<FileDescriptor> BuildFromByteStrings(IEnumerable<ByteString> descriptorData)
Converts the given descriptor binary data into FileDescriptor objects.
Note: reflection using the returned FileDescriptors is not currently supported.
Performs initialization for the given generic type argument.
public static FileDescriptor FromGeneratedCode(byte[] descriptorData, FileDescriptor[] dependencies, GeneratedClrTypeInfo generatedCodeInfo)
Creates a descriptor for generated code.
Finds a type (message, enum, service or extension) in the file by name. Does not find nested types.
Gets a single value file option for this descriptor
Gets a repeated value file option for this descriptor
The FileOptions, defined in descriptor.proto.
If the options message is not present (i.e. there are no options), null is returned.
Custom options can be retrieved as extensions of the returned message.
NOTE: A defensive copy is created each time this property is retrieved.
Returns a clone of the underlying FileDescriptorProto describing this file.
Note that a copy is taken every time this method is called, so clients using it frequently
(and not modifying it) may want to cache the returned value.