Class FileDescriptorProto
Describes a complete .proto file.
Inheritance
System.Object
FileDescriptorProto
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Google.Protobuf.dll
Syntax
public sealed class FileDescriptorProto : IMessage<FileDescriptorProto>, IMessage, IEquatable<FileDescriptorProto>, IDeepCloneable<FileDescriptorProto>
Constructors
FileDescriptorProto()
Declaration
public FileDescriptorProto()
FileDescriptorProto(FileDescriptorProto)
Declaration
public FileDescriptorProto(FileDescriptorProto other)
Parameters
Fields
DependencyFieldNumber
Field number for the "dependency" field.
Declaration
public const int DependencyFieldNumber = 3
Field Value
Type |
Description |
System.Int32 |
|
EnumTypeFieldNumber
Field number for the "enum_type" field.
Declaration
public const int EnumTypeFieldNumber = 5
Field Value
Type |
Description |
System.Int32 |
|
ExtensionFieldNumber
Field number for the "extension" field.
Declaration
public const int ExtensionFieldNumber = 7
Field Value
Type |
Description |
System.Int32 |
|
MessageTypeFieldNumber
Field number for the "message_type" field.
Declaration
public const int MessageTypeFieldNumber = 4
Field Value
Type |
Description |
System.Int32 |
|
NameFieldNumber
Field number for the "name" field.
Declaration
public const int NameFieldNumber = 1
Field Value
Type |
Description |
System.Int32 |
|
OptionsFieldNumber
Field number for the "options" field.
Declaration
public const int OptionsFieldNumber = 8
Field Value
Type |
Description |
System.Int32 |
|
PackageFieldNumber
Field number for the "package" field.
Declaration
public const int PackageFieldNumber = 2
Field Value
Type |
Description |
System.Int32 |
|
PublicDependencyFieldNumber
Field number for the "public_dependency" field.
Declaration
public const int PublicDependencyFieldNumber = 10
Field Value
Type |
Description |
System.Int32 |
|
ServiceFieldNumber
Field number for the "service" field.
Declaration
public const int ServiceFieldNumber = 6
Field Value
Type |
Description |
System.Int32 |
|
SourceCodeInfoFieldNumber
Field number for the "source_code_info" field.
Declaration
public const int SourceCodeInfoFieldNumber = 9
Field Value
Type |
Description |
System.Int32 |
|
SyntaxFieldNumber
Field number for the "syntax" field.
Declaration
public const int SyntaxFieldNumber = 12
Field Value
Type |
Description |
System.Int32 |
|
WeakDependencyFieldNumber
Field number for the "weak_dependency" field.
Declaration
public const int WeakDependencyFieldNumber = 11
Field Value
Type |
Description |
System.Int32 |
|
Properties
Dependency
Names of files imported by this file.
Declaration
public RepeatedField<string> Dependency { get; }
Property Value
Descriptor
Declaration
public static MessageDescriptor Descriptor { get; }
Property Value
EnumType
Declaration
public RepeatedField<EnumDescriptorProto> EnumType { get; }
Property Value
Extension
Declaration
public RepeatedField<FieldDescriptorProto> Extension { get; }
Property Value
HasName
Gets whether the "name" field is set
Declaration
public bool HasName { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasOptions
Gets whether the options field is set
Declaration
public bool HasOptions { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasPackage
Gets whether the "package" field is set
Declaration
public bool HasPackage { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasSourceCodeInfo
Gets whether the source_code_info field is set
Declaration
public bool HasSourceCodeInfo { get; }
Property Value
Type |
Description |
System.Boolean |
|
HasSyntax
Gets whether the "syntax" field is set
Declaration
public bool HasSyntax { get; }
Property Value
Type |
Description |
System.Boolean |
|
MessageType
All top-level definitions in this file.
Declaration
public RepeatedField<DescriptorProto> MessageType { get; }
Property Value
Name
file name, relative to root of source tree
Declaration
public string Name { get; set; }
Property Value
Type |
Description |
System.String |
|
Options
Declaration
public FileOptions Options { get; set; }
Property Value
Package
e.g. "foo", "foo.bar", etc.
Declaration
public string Package { get; set; }
Property Value
Type |
Description |
System.String |
|
Parser
Declaration
public static MessageParser<FileDescriptorProto> Parser { get; }
Property Value
PublicDependency
Indexes of the public imported files in the dependency list above.
Declaration
public RepeatedField<int> PublicDependency { get; }
Property Value
Service
Declaration
public RepeatedField<ServiceDescriptorProto> Service { get; }
Property Value
SourceCodeInfo
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.
Declaration
public SourceCodeInfo SourceCodeInfo { get; set; }
Property Value
Syntax
The syntax of the proto file.
The supported values are "proto2" and "proto3".
Declaration
public string Syntax { get; set; }
Property Value
Type |
Description |
System.String |
|
WeakDependency
Indexes of the weak imported files in the dependency list.
For Google-internal migration only. Do not use.
Declaration
public RepeatedField<int> WeakDependency { get; }
Property Value
Methods
CalculateSize()
Declaration
public int CalculateSize()
Returns
Type |
Description |
System.Int32 |
|
Implements
ClearName()
Clears the value of the "name" field
Declaration
ClearOptions()
Clears the value of the options field
Declaration
public void ClearOptions()
ClearPackage()
Clears the value of the "package" field
Declaration
public void ClearPackage()
ClearSourceCodeInfo()
Clears the value of the source_code_info field
Declaration
public void ClearSourceCodeInfo()
ClearSyntax()
Clears the value of the "syntax" field
Declaration
public void ClearSyntax()
Clone()
Declaration
public FileDescriptorProto Clone()
Returns
Implements
Equals(FileDescriptorProto)
Declaration
public bool Equals(FileDescriptorProto other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IEquatable<T>.Equals(T)
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
System.Object |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
Declaration
public void MergeFrom(CodedInputStream input)
Parameters
Implements
MergeFrom(FileDescriptorProto)
Declaration
public void MergeFrom(FileDescriptorProto other)
Parameters
Implements
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
WriteTo(CodedOutputStream)
Declaration
public void WriteTo(CodedOutputStream output)
Parameters
Implements
Explicit Interface Implementations
IMessage.Descriptor
Declaration
MessageDescriptor IMessage.Descriptor { get; }
Returns
Implements
Extension Methods