Show / Hide Table of Contents

Class DescriptorProto

Describes a message type.

Inheritance
System.Object
DescriptorProto
Implements
IMessage<DescriptorProto>
IMessage
System.IEquatable<DescriptorProto>
IDeepCloneable<DescriptorProto>
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 DescriptorProto : IMessage<DescriptorProto>, IMessage, IEquatable<DescriptorProto>, IDeepCloneable<DescriptorProto>

Constructors

DescriptorProto()

Declaration
public DescriptorProto()

DescriptorProto(DescriptorProto)

Declaration
public DescriptorProto(DescriptorProto other)
Parameters
Type Name Description
DescriptorProto other

Fields

EnumTypeFieldNumber

Field number for the "enum_type" field.

Declaration
public const int EnumTypeFieldNumber = 4
Field Value
Type Description
System.Int32

ExtensionFieldNumber

Field number for the "extension" field.

Declaration
public const int ExtensionFieldNumber = 6
Field Value
Type Description
System.Int32

ExtensionRangeFieldNumber

Field number for the "extension_range" field.

Declaration
public const int ExtensionRangeFieldNumber = 5
Field Value
Type Description
System.Int32

FieldFieldNumber

Field number for the "field" field.

Declaration
public const int FieldFieldNumber = 2
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

NestedTypeFieldNumber

Field number for the "nested_type" field.

Declaration
public const int NestedTypeFieldNumber = 3
Field Value
Type Description
System.Int32

OneofDeclFieldNumber

Field number for the "oneof_decl" field.

Declaration
public const int OneofDeclFieldNumber = 8
Field Value
Type Description
System.Int32

OptionsFieldNumber

Field number for the "options" field.

Declaration
public const int OptionsFieldNumber = 7
Field Value
Type Description
System.Int32

ReservedNameFieldNumber

Field number for the "reserved_name" field.

Declaration
public const int ReservedNameFieldNumber = 10
Field Value
Type Description
System.Int32

ReservedRangeFieldNumber

Field number for the "reserved_range" field.

Declaration
public const int ReservedRangeFieldNumber = 9
Field Value
Type Description
System.Int32

Properties

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>

ExtensionRange

Declaration
public RepeatedField<DescriptorProto.Types.ExtensionRange> ExtensionRange { get; }
Property Value
Type Description
RepeatedField<DescriptorProto.Types.ExtensionRange>

Field

Declaration
public RepeatedField<FieldDescriptorProto> Field { 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

Name

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String

NestedType

Declaration
public RepeatedField<DescriptorProto> NestedType { get; }
Property Value
Type Description
RepeatedField<DescriptorProto>

OneofDecl

Declaration
public RepeatedField<OneofDescriptorProto> OneofDecl { get; }
Property Value
Type Description
RepeatedField<OneofDescriptorProto>

Options

Declaration
public MessageOptions Options { get; set; }
Property Value
Type Description
MessageOptions

Parser

Declaration
public static MessageParser<DescriptorProto> Parser { get; }
Property Value
Type Description
MessageParser<DescriptorProto>

ReservedName

Reserved field names, which may not be used by fields in the same message. A given name may only be reserved once.

Declaration
public RepeatedField<string> ReservedName { get; }
Property Value
Type Description
RepeatedField<System.String>

ReservedRange

Declaration
public RepeatedField<DescriptorProto.Types.ReservedRange> ReservedRange { get; }
Property Value
Type Description
RepeatedField<DescriptorProto.Types.ReservedRange>

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()

Clone()

Declaration
public DescriptorProto Clone()
Returns
Type Description
DescriptorProto
Implements
IDeepCloneable<T>.Clone()

Equals(DescriptorProto)

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

Declaration
public void MergeFrom(DescriptorProto other)
Parameters
Type Name Description
DescriptorProto 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