Class SourceContext

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
TypeNameDescription
SourceContextother

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
TypeNameDescription
SourceContextother
Returns
TypeDescription
Boolean

Equals(Object)

public override bool Equals(object other)
Parameter
TypeNameDescription
Objectother
Returns
TypeDescription
Boolean

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
Int32

MergeFrom(CodedInputStream)

public void MergeFrom(CodedInputStream input)
Parameter
TypeNameDescription
CodedInputStreaminput

MergeFrom(SourceContext)

public void MergeFrom(SourceContext other)
Parameter
TypeNameDescription
SourceContextother

ToString()

public override string ToString()
Returns
TypeDescription
String

WriteTo(CodedOutputStream)

public void WriteTo(CodedOutputStream output)
Parameter
TypeNameDescription
CodedOutputStreamoutput

Explicit Interface Implementations

IBufferMessage.InternalMergeFrom(ref ParseContext)

void IBufferMessage.InternalMergeFrom(ref ParseContext input)
Parameter
TypeNameDescription
ParseContextinput

IBufferMessage.InternalWriteTo(ref WriteContext)

void IBufferMessage.InternalWriteTo(ref WriteContext output)
Parameter
TypeNameDescription
WriteContextoutput

IMessage.Descriptor

MessageDescriptor IMessage.Descriptor { get; }
Returns
TypeDescription
MessageDescriptor

Implements

IEquatable<>