public sealed class FileDescriptorProto : object, IMessage<FileDescriptorProto>, IEquatable<FileDescriptorProto>, IDeepCloneable<FileDescriptorProto>, IBufferMessage, IMessage
Describes a complete .proto file.
Inheritance
Object >
FileDescriptorProto
Namespace
Google.Protobuf.Reflection
Assembly
Google.Protobuf.dll
Constructors
FileDescriptorProto()
public FileDescriptorProto()
FileDescriptorProto(FileDescriptorProto)
public FileDescriptorProto(FileDescriptorProto other)
Parameter
Fields
DependencyFieldNumber
public const int DependencyFieldNumber = null
Field number for the "dependency" field.
Field Value
EnumTypeFieldNumber
public const int EnumTypeFieldNumber = null
Field number for the "enum_type" field.
Field Value
ExtensionFieldNumber
public const int ExtensionFieldNumber = null
Field number for the "extension" field.
Field Value
MessageTypeFieldNumber
public const int MessageTypeFieldNumber = null
Field number for the "message_type" field.
Field Value
NameFieldNumber
public const int NameFieldNumber = null
Field number for the "name" field.
Field Value
OptionsFieldNumber
public const int OptionsFieldNumber = null
Field number for the "options" field.
Field Value
PackageFieldNumber
public const int PackageFieldNumber = null
Field number for the "package" field.
Field Value
PublicDependencyFieldNumber
public const int PublicDependencyFieldNumber = null
Field number for the "public_dependency" field.
Field Value
ServiceFieldNumber
public const int ServiceFieldNumber = null
Field number for the "service" field.
Field Value
SourceCodeInfoFieldNumber
public const int SourceCodeInfoFieldNumber = null
Field number for the "source_code_info" field.
Field Value
SyntaxFieldNumber
public const int SyntaxFieldNumber = null
Field number for the "syntax" field.
Field Value
WeakDependencyFieldNumber
public const int WeakDependencyFieldNumber = null
Field number for the "weak_dependency" field.
Field Value
Properties
Dependency
public RepeatedField<string> Dependency { get; }
Names of files imported by this file.
Property Value
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
EnumType
public RepeatedField<EnumDescriptorProto> EnumType { get; }
Property Value
Extension
public RepeatedField<FieldDescriptorProto> Extension { get; }
Property Value
HasName
public bool HasName { get; }
Gets whether the "name" field is set
Property Value
HasPackage
public bool HasPackage { get; }
Gets whether the "package" field is set
Property Value
HasSyntax
public bool HasSyntax { get; }
Gets whether the "syntax" field is set
Property Value
MessageType
public RepeatedField<DescriptorProto> MessageType { get; }
All top-level definitions in this file.
Property Value
Name
public string Name { get; set; }
file name, relative to root of source tree
Property Value
Options
public FileOptions Options { get; set; }
Property Value
Package
public string Package { get; set; }
e.g. "foo", "foo.bar", etc.
Property Value
Parser
public static MessageParser<FileDescriptorProto> Parser { get; }
Property Value
PublicDependency
public RepeatedField<int> PublicDependency { get; }
Indexes of the public imported files in the dependency list above.
Property Value
Service
public RepeatedField<ServiceDescriptorProto> Service { get; }
Property Value
SourceCodeInfo
public SourceCodeInfo SourceCodeInfo { get; set; }
This field contains optional information about the original source code.
You may safely remove this entire field without harming runtime
functionality of the descriptors -- the information is needed only by
development tools.
Property Value
Syntax
public string Syntax { get; set; }
The syntax of the proto file.
The supported values are "proto2" and "proto3".
Property Value
WeakDependency
public RepeatedField<int> WeakDependency { get; }
Indexes of the weak imported files in the dependency list.
For Google-internal migration only. Do not use.
Property Value
Methods
CalculateSize()
public int CalculateSize()
Returns
ClearName()
Clears the value of the "name" field
ClearPackage()
public void ClearPackage()
Clears the value of the "package" field
ClearSyntax()
public void ClearSyntax()
Clears the value of the "syntax" field
Clone()
public FileDescriptorProto Clone()
Returns
Equals(FileDescriptorProto)
public bool Equals(FileDescriptorProto other)
Parameter
Returns
Equals(Object)
public override bool Equals(object other)
Parameter
Returns
GetHashCode()
public override int GetHashCode()
Returns
public void MergeFrom(CodedInputStream input)
Parameter
MergeFrom(FileDescriptorProto)
public void MergeFrom(FileDescriptorProto other)
Parameter
ToString()
public override string ToString()
Returns
WriteTo(CodedOutputStream)
public void WriteTo(CodedOutputStream output)
Parameter
Explicit Interface Implementations
IBufferMessage.InternalMergeFrom(ref ParseContext)
void IBufferMessage.InternalMergeFrom(ref ParseContext input)
Parameter
IBufferMessage.InternalWriteTo(ref WriteContext)
void IBufferMessage.InternalWriteTo(ref WriteContext output)
Parameter
IMessage.Descriptor
MessageDescriptor IMessage.Descriptor { get; }
Returns