Class GeneratedCodeInfo.Types.Annotation (3.27.1)

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
Name Description
other GeneratedCodeInfoTypesAnnotation

Fields

BeginFieldNumber

public const int BeginFieldNumber = 3

Field number for the "begin" field.

Field Value
Type Description
int

EndFieldNumber

public const int EndFieldNumber = 4

Field number for the "end" field.

Field Value
Type Description
int

PathFieldNumber

public const int PathFieldNumber = 1

Field number for the "path" field.

Field Value
Type Description
int

SemanticFieldNumber

public const int SemanticFieldNumber = 5

Field number for the "semantic" field.

Field Value
Type Description
int

SourceFileFieldNumber

public const int SourceFileFieldNumber = 2

Field number for the "source_file" field.

Field Value
Type Description
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
Type Description
int

Descriptor

public static MessageDescriptor Descriptor { get; }
Property Value
Type Description
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
Type Description
int

HasBegin

public bool HasBegin { get; }

Gets whether the "begin" field is set

Property Value
Type Description
bool

HasEnd

public bool HasEnd { get; }

Gets whether the "end" field is set

Property Value
Type Description
bool

HasSemantic

public bool HasSemantic { get; }

Gets whether the "semantic" field is set

Property Value
Type Description
bool

HasSourceFile

public bool HasSourceFile { get; }

Gets whether the "source_file" field is set

Property Value
Type Description
bool

Parser

public static MessageParser<GeneratedCodeInfo.Types.Annotation> Parser { get; }
Property Value
Type Description
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
Type Description
RepeatedFieldint

Semantic

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

SourceFile

public string SourceFile { get; set; }

Identifies the filesystem path to the original source .proto.

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.

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

A deep clone of this object.

Equals(Annotation)

public bool Equals(GeneratedCodeInfo.Types.Annotation other)
Parameter
Name Description
other GeneratedCodeInfoTypesAnnotation
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(Annotation)

public void MergeFrom(GeneratedCodeInfo.Types.Annotation other)

Merges the given message into this one.

Parameter
Name Description
other GeneratedCodeInfoTypesAnnotation
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