Class GeneratedCodeInfo.Types.Annotation (3.23.0)

public sealed class GeneratedCodeInfo.Types.Annotation : IMessage<GeneratedCodeInfo.Types.Annotation>, IEquatable<GeneratedCodeInfo.Types.Annotation>, IDeepCloneable<GeneratedCodeInfo.Types.Annotation>, IBufferMessage, IMessage

Inheritance

object > GeneratedCodeInfo.Types.Annotation

Namespace

Google.Protobuf.Reflection

Assembly

Google.Protobuf.dll

Constructors

Annotation()

public Annotation()

Annotation(Annotation)

public Annotation(GeneratedCodeInfo.Types.Annotation other)
Parameter
NameDescription
otherGeneratedCodeInfoTypesAnnotation

Fields

BeginFieldNumber

public const int BeginFieldNumber = 3

Field number for the "begin" field.

Field Value
TypeDescription
int

EndFieldNumber

public const int EndFieldNumber = 4

Field number for the "end" field.

Field Value
TypeDescription
int

PathFieldNumber

public const int PathFieldNumber = 1

Field number for the "path" field.

Field Value
TypeDescription
int

SemanticFieldNumber

public const int SemanticFieldNumber = 5

Field number for the "semantic" field.

Field Value
TypeDescription
int

SourceFileFieldNumber

public const int SourceFileFieldNumber = 2

Field number for the "source_file" field.

Field Value
TypeDescription
int

Properties

Begin

public int Begin { get; set; }

Identifies the starting offset in bytes in the generated code that relates to the identified object.

Property Value
TypeDescription
int

Descriptor

public static MessageDescriptor Descriptor { get; }
Property Value
TypeDescription
MessageDescriptor

End

public int End { get; set; }

Identifies the ending offset in bytes in the generated code that relates to the identified object. The end offset should be one past the last relevant byte (so the length of the text = end - begin).

Property Value
TypeDescription
int

HasBegin

public bool HasBegin { get; }

Gets whether the "begin" field is set

Property Value
TypeDescription
bool

HasEnd

public bool HasEnd { get; }

Gets whether the "end" field is set

Property Value
TypeDescription
bool

HasSemantic

public bool HasSemantic { get; }

Gets whether the "semantic" field is set

Property Value
TypeDescription
bool

HasSourceFile

public bool HasSourceFile { get; }

Gets whether the "source_file" field is set

Property Value
TypeDescription
bool

Parser

public static MessageParser<GeneratedCodeInfo.Types.Annotation> Parser { get; }
Property Value
TypeDescription
MessageParserGeneratedCodeInfoTypesAnnotation

Path

public RepeatedField<int> Path { get; }

Identifies the element in the original source .proto file. This field is formatted the same as SourceCodeInfo.Location.path.

Property Value
TypeDescription
RepeatedFieldint

Semantic

public GeneratedCodeInfo.Types.Annotation.Types.Semantic Semantic { get; set; }
Property Value
TypeDescription
GeneratedCodeInfoTypesAnnotationTypesSemantic

SourceFile

public string SourceFile { get; set; }

Identifies the filesystem path to the original source .proto.

Property Value
TypeDescription
string

Methods

CalculateSize()

public int CalculateSize()

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

Returns
TypeDescription
int

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

ClearBegin()

public void ClearBegin()

Clears the value of the "begin" field

ClearEnd()

public void ClearEnd()

Clears the value of the "end" field

ClearSemantic()

public void ClearSemantic()

Clears the value of the "semantic" field

ClearSourceFile()

public void ClearSourceFile()

Clears the value of the "source_file" field

Clone()

public GeneratedCodeInfo.Types.Annotation Clone()

Creates a deep clone of this object.

Returns
TypeDescription
GeneratedCodeInfoTypesAnnotation

A deep clone of this object.

Equals(Annotation)

public bool Equals(GeneratedCodeInfo.Types.Annotation other)
Parameter
NameDescription
otherGeneratedCodeInfoTypesAnnotation
Returns
TypeDescription
bool

Equals(object)

public override bool Equals(object other)
Parameter
NameDescription
otherobject
Returns
TypeDescription
bool
Overrides

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
int
Overrides

MergeFrom(CodedInputStream)

public void MergeFrom(CodedInputStream input)

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

Parameter
NameDescription
inputCodedInputStream
Remarks

See the user guide for precise merge semantics.

MergeFrom(Annotation)

public void MergeFrom(GeneratedCodeInfo.Types.Annotation other)

Merges the given message into this one.

Parameter
NameDescription
otherGeneratedCodeInfoTypesAnnotation
Remarks

See the user guide for precise merge semantics.

ToString()

public override string ToString()
Returns
TypeDescription
string
Overrides

WriteTo(CodedOutputStream)

public void WriteTo(CodedOutputStream output)

Writes the data to the given coded output stream.

Parameter
NameDescription
outputCodedOutputStream

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

Extension Methods