<PackageReference Include="Google.Protobuf" Version="3.35.0" />

Google.Protobuf.Reflection.DescriptorDeclaration

public sealed class DescriptorDeclaration
Provides additional information about the declaration of a descriptor, such as source location and comments.
public IDescriptor Descriptor { get; }

The descriptor this declaration relates to.

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.)

public int EndLine { get; }

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

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.

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.

public int StartColumn { get; }

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

public int StartLine { get; }

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

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.