SyntaxGenerator.GetDeclaration Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- kind
- DeclarationKind
Returns
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET