Send feedback
Class FileDescriptorProto (3.15.8)
Stay organized with collections
Save and categorize content based on your preferences.
Version 3.15.8 keyboard_arrow_down
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)
Fields
DependencyFieldNumber
public const int DependencyFieldNumber = null
Field number for the "dependency" field.
Field Value Type Description Int32
EnumTypeFieldNumber
public const int EnumTypeFieldNumber = null
Field number for the "enum_type" field.
Field Value Type Description Int32
ExtensionFieldNumber
public const int ExtensionFieldNumber = null
Field number for the "extension" field.
Field Value Type Description Int32
MessageTypeFieldNumber
public const int MessageTypeFieldNumber = null
Field number for the "message_type" field.
Field Value Type Description Int32
NameFieldNumber
public const int NameFieldNumber = null
Field number for the "name" field.
Field Value Type Description Int32
OptionsFieldNumber
public const int OptionsFieldNumber = null
Field number for the "options" field.
Field Value Type Description Int32
PackageFieldNumber
public const int PackageFieldNumber = null
Field number for the "package" field.
Field Value Type Description Int32
PublicDependencyFieldNumber
public const int PublicDependencyFieldNumber = null
Field number for the "public_dependency" field.
Field Value Type Description Int32
ServiceFieldNumber
public const int ServiceFieldNumber = null
Field number for the "service" field.
Field Value Type Description Int32
SourceCodeInfoFieldNumber
public const int SourceCodeInfoFieldNumber = null
Field number for the "source_code_info" field.
Field Value Type Description Int32
SyntaxFieldNumber
public const int SyntaxFieldNumber = null
Field number for the "syntax" field.
Field Value Type Description Int32
WeakDependencyFieldNumber
public const int WeakDependencyFieldNumber = null
Field number for the "weak_dependency" field.
Field Value Type Description Int32
Properties
Dependency
public RepeatedField<string> Dependency { get; }
Names of files imported by this file.
Descriptor
public static MessageDescriptor Descriptor { get; }
EnumType
public RepeatedField<EnumDescriptorProto> EnumType { get; }
Extension
public RepeatedField<FieldDescriptorProto> Extension { get; }
HasName
public bool HasName { get; }
Gets whether the "name" field is set
Property Value Type Description Boolean
HasPackage
public bool HasPackage { get; }
Gets whether the "package" field is set
Property Value Type Description Boolean
HasSyntax
public bool HasSyntax { get; }
Gets whether the "syntax" field is set
Property Value Type Description Boolean
MessageType
public RepeatedField<DescriptorProto> MessageType { get; }
All top-level definitions in this file.
Name
public string Name { get; set; }
file name, relative to root of source tree
Property Value Type Description String
Options
public FileOptions Options { get; set; }
Package
public string Package { get; set; }
e.g. "foo", "foo.bar", etc.
Property Value Type Description String
Parser
public static MessageParser<FileDescriptorProto> Parser { get; }
PublicDependency
public RepeatedField<int> PublicDependency { get; }
Indexes of the public imported files in the dependency list above.
Service
public RepeatedField<ServiceDescriptorProto> Service { get; }
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.
Syntax
public string Syntax { get; set; }
The syntax of the proto file.
The supported values are "proto2" and "proto3".
Property Value Type Description String
WeakDependency
public RepeatedField<int> WeakDependency { get; }
Indexes of the weak imported files in the dependency list.
For Google-internal migration only. Do not use.
Methods
CalculateSize()
public int CalculateSize()
Returns Type Description Int32
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()
Equals(FileDescriptorProto)
public bool Equals(FileDescriptorProto other)
Equals(Object)
public override bool Equals(object other)
Parameter Name Description other
Object
GetHashCode()
public override int GetHashCode()
Returns Type Description Int32
public void MergeFrom(CodedInputStream input)
MergeFrom(FileDescriptorProto)
public void MergeFrom(FileDescriptorProto other)
ToString()
public override string ToString()
WriteTo(CodedOutputStream)
public void WriteTo(CodedOutputStream output)
Explicit Interface Implementations
IBufferMessage.InternalMergeFrom(ref ParseContext)
void IBufferMessage.InternalMergeFrom(ref ParseContext input)
IBufferMessage.InternalWriteTo(ref WriteContext)
void IBufferMessage.InternalWriteTo(ref WriteContext output)
IMessage.Descriptor
MessageDescriptor IMessage.Descriptor { get; }
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-14 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-14 UTC."],[],[]]