Show / Hide Table of Contents

Class FileDescriptorProto

Describes a complete .proto file.

Inheritance
System.Object
FileDescriptorProto
Implements
IMessage<FileDescriptorProto>
IMessage
System.IEquatable<FileDescriptorProto>
IDeepCloneable<FileDescriptorProto>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Protobuf.Reflection
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
Type Name Description
FileDescriptorProto other

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
Type Description
RepeatedField<System.String>

Descriptor

Declaration
public static MessageDescriptor Descriptor { get; }
Property Value
Type Description
MessageDescriptor

EnumType

Declaration
public RepeatedField<EnumDescriptorProto> EnumType { get; }
Property Value
Type Description
RepeatedField<EnumDescriptorProto>

Extension

Declaration
public RepeatedField<FieldDescriptorProto> Extension { get; }
Property Value
Type Description
RepeatedField<FieldDescriptorProto>

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
Type Description
RepeatedField<DescriptorProto>

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
Type Description
FileOptions

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
Type Description
MessageParser<FileDescriptorProto>

PublicDependency

Indexes of the public imported files in the dependency list above.

Declaration
public RepeatedField<int> PublicDependency { get; }
Property Value
Type Description
RepeatedField<System.Int32>

Service

Declaration
public RepeatedField<ServiceDescriptorProto> Service { get; }
Property Value
Type Description
RepeatedField<ServiceDescriptorProto>

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
Type Description
SourceCodeInfo

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
Type Description
RepeatedField<System.Int32>

Methods

CalculateSize()

Declaration
public int CalculateSize()
Returns
Type Description
System.Int32
Implements
IMessage.CalculateSize()

ClearName()

Clears the value of the "name" field

Declaration
public void ClearName()

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
Type Description
FileDescriptorProto
Implements
IDeepCloneable<T>.Clone()

Equals(FileDescriptorProto)

Declaration
public bool Equals(FileDescriptorProto other)
Parameters
Type Name Description
FileDescriptorProto other
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()

MergeFrom(CodedInputStream)

Declaration
public void MergeFrom(CodedInputStream input)
Parameters
Type Name Description
CodedInputStream input
Implements
IMessage.MergeFrom(CodedInputStream)

MergeFrom(FileDescriptorProto)

Declaration
public void MergeFrom(FileDescriptorProto other)
Parameters
Type Name Description
FileDescriptorProto other
Implements
IMessage<T>.MergeFrom(T)

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

WriteTo(CodedOutputStream)

Declaration
public void WriteTo(CodedOutputStream output)
Parameters
Type Name Description
CodedOutputStream output
Implements
IMessage.WriteTo(CodedOutputStream)

Explicit Interface Implementations

IMessage.Descriptor

Declaration
MessageDescriptor IMessage.Descriptor { get; }
Returns
Type Description
MessageDescriptor
Implements
IMessage.Descriptor

Extension Methods

MessageExtensions.MergeFrom(IMessage, Byte[])
MessageExtensions.MergeFrom(IMessage, Byte[], Int32, Int32)
MessageExtensions.MergeFrom(IMessage, ByteString)
MessageExtensions.MergeFrom(IMessage, Stream)
MessageExtensions.MergeDelimitedFrom(IMessage, Stream)
MessageExtensions.ToByteArray(IMessage)
MessageExtensions.WriteTo(IMessage, Stream)
MessageExtensions.WriteDelimitedTo(IMessage, Stream)
MessageExtensions.ToByteString(IMessage)
MessageExtensions.IsInitialized(IMessage)
Back to top