Class SourceContext (3.15.8)

public sealed class SourceContext : object, IMessage<SourceContext>, IEquatable<SourceContext>, IDeepCloneable<SourceContext>, IBufferMessage, IMessage

SourceContext represents information about the source of a protobuf element, like the file in which it is defined.

Inheritance

Object > SourceContext

Namespace

Google.Protobuf.WellKnownTypes

Assembly

Google.Protobuf.dll

Constructors

SourceContext()

public SourceContext()

SourceContext(SourceContext)

public SourceContext(SourceContext other)
Parameter
NameDescription
otherSourceContext

Fields

FileNameFieldNumber

public const int FileNameFieldNumber = null

Field number for the "file_name" field.

Field Value
TypeDescription
Int32

Properties

Descriptor

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

FileName

public string FileName { get; set; }

The path-qualified name of the .proto file that contained the associated protobuf element. For example: &quot;google/protobuf/source_context.proto&quot;.

Property Value
TypeDescription
String

Parser

public static MessageParser<SourceContext> Parser { get; }
Property Value
TypeDescription
MessageParser<SourceContext>

Methods

CalculateSize()

public int CalculateSize()
Returns
TypeDescription
Int32

Clone()

public SourceContext Clone()
Returns
TypeDescription
SourceContext

Equals(SourceContext)

public bool Equals(SourceContext other)
Parameter
NameDescription
otherSourceContext
Returns
TypeDescription
Boolean

Equals(Object)

public override bool Equals(object other)
Parameter
NameDescription
otherObject
Returns
TypeDescription
Boolean

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
Int32

MergeFrom(CodedInputStream)

public void MergeFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream

MergeFrom(SourceContext)

public void MergeFrom(SourceContext other)
Parameter
NameDescription
otherSourceContext

ToString()

public override string ToString()
Returns
TypeDescription
String

WriteTo(CodedOutputStream)

public void WriteTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream

Explicit Interface Implementations

IBufferMessage.InternalMergeFrom(ref ParseContext)

void IBufferMessage.InternalMergeFrom(ref ParseContext input)
Parameter
NameDescription
inputParseContext

IBufferMessage.InternalWriteTo(ref WriteContext)

void IBufferMessage.InternalWriteTo(ref WriteContext output)
Parameter
NameDescription
outputWriteContext

IMessage.Descriptor

MessageDescriptor IMessage.Descriptor { get; }
Returns
TypeDescription
MessageDescriptor