Class DescriptorDeclaration

public sealed class DescriptorDeclaration : object

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
Int32

EndLine

public int EndLine { get; }

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

Property Value
TypeDescription
Int32

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
IReadOnlyList<String>

StartColumn

public int StartColumn { get; }

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

Property Value
TypeDescription
Int32

StartLine

public int StartLine { get; }

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

Property Value
TypeDescription
Int32

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