Delen via


SyntaxGenerator.GetDeclaration Method

Definition

Overloads

GetDeclaration(SyntaxNode)

Returns the node if it is a declaration, the immediate enclosing declaration if one exists, or null.

GetDeclaration(SyntaxNode, DeclarationKind)

Returns the enclosing declaration of the specified kind or null.

GetDeclaration(SyntaxNode)

Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs

Returns the node if it is a declaration, the immediate enclosing declaration if one exists, or null.

public:
 Microsoft::CodeAnalysis::SyntaxNode ^ GetDeclaration(Microsoft::CodeAnalysis::SyntaxNode ^ node);
public Microsoft.CodeAnalysis.SyntaxNode GetDeclaration (Microsoft.CodeAnalysis.SyntaxNode node);
public Microsoft.CodeAnalysis.SyntaxNode? GetDeclaration (Microsoft.CodeAnalysis.SyntaxNode? node);
member this.GetDeclaration : Microsoft.CodeAnalysis.SyntaxNode -> Microsoft.CodeAnalysis.SyntaxNode
Public Function GetDeclaration (node As SyntaxNode) As SyntaxNode

Parameters

node
SyntaxNode

Returns

Applies to

GetDeclaration(SyntaxNode, DeclarationKind)

Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs
Source:
SyntaxGenerator.cs

Returns the enclosing declaration of the specified kind or null.

public:
 Microsoft::CodeAnalysis::SyntaxNode ^ GetDeclaration(Microsoft::CodeAnalysis::SyntaxNode ^ node, Microsoft::CodeAnalysis::Editing::DeclarationKind kind);
public Microsoft.CodeAnalysis.SyntaxNode GetDeclaration (Microsoft.CodeAnalysis.SyntaxNode node, Microsoft.CodeAnalysis.Editing.DeclarationKind kind);
public Microsoft.CodeAnalysis.SyntaxNode? GetDeclaration (Microsoft.CodeAnalysis.SyntaxNode? node, Microsoft.CodeAnalysis.Editing.DeclarationKind kind);
member this.GetDeclaration : Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.Editing.DeclarationKind -> Microsoft.CodeAnalysis.SyntaxNode
Public Function GetDeclaration (node As SyntaxNode, kind As DeclarationKind) As SyntaxNode

Parameters

node
SyntaxNode

Returns

Applies to