Class ExtensionRangeOptions.Types.Declaration (3.27.1)

public sealed class ExtensionRangeOptions.Types.Declaration : IMessage<ExtensionRangeOptions.Types.Declaration>, IEquatable<ExtensionRangeOptions.Types.Declaration>, IDeepCloneable<ExtensionRangeOptions.Types.Declaration>, IBufferMessage, IMessage

Inheritance

object > ExtensionRangeOptions.Types.Declaration

Namespace

Google.Protobuf.Reflection

Assembly

Google.Protobuf.dll

Constructors

Declaration()

public Declaration()

Declaration(Declaration)

public Declaration(ExtensionRangeOptions.Types.Declaration other)
Parameter
Name Description
other ExtensionRangeOptionsTypesDeclaration

Fields

FullNameFieldNumber

public const int FullNameFieldNumber = 2

Field number for the "full_name" field.

Field Value
Type Description
int

NumberFieldNumber

public const int NumberFieldNumber = 1

Field number for the "number" field.

Field Value
Type Description
int

RepeatedFieldNumber

public const int RepeatedFieldNumber = 6

Field number for the "repeated" field.

Field Value
Type Description
int

ReservedFieldNumber

public const int ReservedFieldNumber = 5

Field number for the "reserved" field.

Field Value
Type Description
int

TypeFieldNumber

public const int TypeFieldNumber = 3

Field number for the "type" field.

Field Value
Type Description
int

Properties

Descriptor

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

FullName

public string FullName { get; set; }

The fully-qualified name of the extension field. There must be a leading dot in front of the full name.

Property Value
Type Description
string

HasFullName

public bool HasFullName { get; }

Gets whether the "full_name" field is set

Property Value
Type Description
bool

HasNumber

public bool HasNumber { get; }

Gets whether the "number" field is set

Property Value
Type Description
bool

HasRepeated

public bool HasRepeated { get; }

Gets whether the "repeated" field is set

Property Value
Type Description
bool

HasReserved

public bool HasReserved { get; }

Gets whether the "reserved" field is set

Property Value
Type Description
bool

HasType

public bool HasType { get; }

Gets whether the "type" field is set

Property Value
Type Description
bool

Number

public int Number { get; set; }

The extension number declared within the extension range.

Property Value
Type Description
int

Parser

public static MessageParser<ExtensionRangeOptions.Types.Declaration> Parser { get; }
Property Value
Type Description
MessageParserExtensionRangeOptionsTypesDeclaration

Repeated

public bool Repeated { get; set; }

If true, indicates that the extension must be defined as repeated. Otherwise the extension must be defined as optional.

Property Value
Type Description
bool

Reserved

public bool Reserved { get; set; }

If true, indicates that the number is reserved in the extension range, and any extension field with the number will fail to compile. Set this when a declared extension field is deleted.

Property Value
Type Description
bool

Type

public string Type { get; set; }

The fully-qualified type name of the extension field. Unlike Metadata.type, Declaration.type must have a leading dot for messages and enums.

Property Value
Type Description
string

Methods

CalculateSize()

public int CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

Returns
Type Description
int

The number of bytes required to write this message to a coded output stream.

ClearFullName()

public void ClearFullName()

Clears the value of the "full_name" field

ClearNumber()

public void ClearNumber()

Clears the value of the "number" field

ClearRepeated()

public void ClearRepeated()

Clears the value of the "repeated" field

ClearReserved()

public void ClearReserved()

Clears the value of the "reserved" field

ClearType()

public void ClearType()

Clears the value of the "type" field

Clone()

public ExtensionRangeOptions.Types.Declaration Clone()

Creates a deep clone of this object.

Returns
Type Description
ExtensionRangeOptionsTypesDeclaration

A deep clone of this object.

Equals(Declaration)

public bool Equals(ExtensionRangeOptions.Types.Declaration other)
Parameter
Name Description
other ExtensionRangeOptionsTypesDeclaration
Returns
Type Description
bool

Equals(object)

public override bool Equals(object other)
Parameter
Name Description
other object
Returns
Type Description
bool
Overrides

GetHashCode()

public override int GetHashCode()
Returns
Type Description
int
Overrides

MergeFrom(CodedInputStream)

public void MergeFrom(CodedInputStream input)

Merges the data from the specified coded input stream with the current message.

Parameter
Name Description
input CodedInputStream
Remarks

See the user guide for precise merge semantics.

MergeFrom(Declaration)

public void MergeFrom(ExtensionRangeOptions.Types.Declaration other)

Merges the given message into this one.

Parameter
Name Description
other ExtensionRangeOptionsTypesDeclaration
Remarks

See the user guide for precise merge semantics.

ToString()

public override string ToString()
Returns
Type Description
string
Overrides

WriteTo(CodedOutputStream)

public void WriteTo(CodedOutputStream output)

Writes the data to the given coded output stream.

Parameter
Name Description
output CodedOutputStream

Coded output stream to write the data to. Must not be null.

Extension Methods