Class SourceContext
SourceContext
represents information about the source of a
protobuf element, like the file in which it is defined.
Inheritance
System.Object
SourceContext
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Google.Protobuf.dll
Syntax
public sealed class SourceContext : IMessage<SourceContext>, IMessage, IEquatable<SourceContext>, IDeepCloneable<SourceContext>
Constructors
SourceContext()
Declaration
SourceContext(SourceContext)
Declaration
public SourceContext(SourceContext other)
Parameters
Fields
FileNameFieldNumber
Field number for the "file_name" field.
Declaration
public const int FileNameFieldNumber = 1
Field Value
Type |
Description |
System.Int32 |
|
Properties
Descriptor
Declaration
public static MessageDescriptor Descriptor { get; }
Property Value
FileName
The path-qualified name of the .proto file that contained the associated
protobuf element. For example: "google/protobuf/source_context.proto"
.
Declaration
public string FileName { get; set; }
Property Value
Type |
Description |
System.String |
|
Parser
Declaration
public static MessageParser<SourceContext> Parser { get; }
Property Value
Methods
CalculateSize()
Declaration
public int CalculateSize()
Returns
Type |
Description |
System.Int32 |
|
Implements
Clone()
Declaration
public SourceContext Clone()
Returns
Implements
Equals(SourceContext)
Declaration
public bool Equals(SourceContext other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IEquatable<T>.Equals(T)
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
System.Object |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
MergeFrom(CodedInputStream)
Declaration
public void MergeFrom(CodedInputStream input)
Parameters
Implements
MergeFrom(SourceContext)
Declaration
public void MergeFrom(SourceContext other)
Parameters
Implements
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
WriteTo(CodedOutputStream)
Declaration
public void WriteTo(CodedOutputStream output)
Parameters
Implements
Explicit Interface Implementations
IMessage.Descriptor
Declaration
MessageDescriptor IMessage.Descriptor { get; }
Returns
Implements
Extension Methods