Skip to main content

SyntaxExtensions.Getter Method

Containing Type: SyntaxExtensions

Assembly: Roslynator.CSharp.dll

Overloads

MethodSummary
Getter(AccessorListSyntax)Returns a get accessor contained in the specified list.
Getter(IndexerDeclarationSyntax)Returns a get accessor that is contained in the specified indexer declaration.
Getter(PropertyDeclarationSyntax)Returns property get accessor, if any.

Getter(AccessorListSyntax)

Returns a get accessor contained in the specified list.

public static Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax? Getter(this Microsoft.CodeAnalysis.CSharp.Syntax.AccessorListSyntax accessorList)

Parameters

accessorList AccessorListSyntax

Returns

AccessorDeclarationSyntax

Getter(IndexerDeclarationSyntax)

Returns a get accessor that is contained in the specified indexer declaration.

public static Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax? Getter(this Microsoft.CodeAnalysis.CSharp.Syntax.IndexerDeclarationSyntax indexerDeclaration)

Parameters

indexerDeclaration IndexerDeclarationSyntax

Returns

AccessorDeclarationSyntax

Getter(PropertyDeclarationSyntax)

Returns property get accessor, if any.

public static Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax? Getter(this Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax propertyDeclaration)

Parameters

propertyDeclaration PropertyDeclarationSyntax

Returns

AccessorDeclarationSyntax