Class DescriptorDeclaration (3.23.0)

public sealed class DescriptorDeclaration

Provides additional information about the declaration of a descriptor, such as source location and comments.

Inheritance

object > DescriptorDeclaration

Namespace

Google.Protobuf.Reflection

Assembly

Google.Protobuf.dll

Properties

Descriptor

public IDescriptor Descriptor { get; }

The descriptor this declaration relates to.

Property Value
TypeDescription
IDescriptor

EndColumn

public int EndColumn { get; }

The end column of the declaration within the source file. This value is 1-based, and exclusive. (The final character of the declaration is on the column before this value.)

Property Value
TypeDescription
int

EndLine

public int EndLine { get; }

// The end line of the declaration within the source file. This value is 1-based.

Property Value
TypeDescription
int

LeadingComments

public string LeadingComments { get; }

Comments appearing before the declaration. Never null, but may be empty. Multi-line comments are represented as a newline-separated string. Leading whitespace and the comment marker ("//") are removed from each line.

Property Value
TypeDescription
string

LeadingDetachedComments

public IReadOnlyList<string> LeadingDetachedComments { get; }

Comments appearing before the declaration, but separated from it by blank lines. Each string represents a newline-separated paragraph of comments. Leading whitespace and the comment marker ("//") are removed from each line. The list is never null, but may be empty. Likewise each element is never null, but may be empty.

Property Value
TypeDescription
IReadOnlyListstring

StartColumn

public int StartColumn { get; }

The start column of the declaration within the source file. This value is 1-based.

Property Value
TypeDescription
int

StartLine

public int StartLine { get; }

The start line of the declaration within the source file. This value is 1-based.

Property Value
TypeDescription
int

TrailingComments

public string TrailingComments { get; }

Comments appearing after the declaration. Never null, but may be empty. Multi-line comments are represented as a newline-separated string. Leading whitespace and the comment marker ("//") are removed from each line.

Property Value
TypeDescription
string