GenericSymbolWithSyntax.FromSyntaxNode - monkey0506/Monkeymoto.GeneratorUtils.GenericSymbolReferenceTree GitHub Wiki

GenericSymbolWithSyntax.FromSyntaxNode(SyntaxNode, SemanticModel, CancellationToken) Method

Definition

Gets a new instance representing the given syntax node and its associated generic symbol.

public static GenericSymbolWithSyntax? FromSyntaxNode(SyntaxNode syntaxNode, SemanticModel semanticModel, CancellationToken cancellationToken)

Parameters

syntaxNode SyntaxNode
The syntax node to associate with a generic symbol

semanticModel SemanticModel
The SemanticModel used to get a symbolic reference to syntaxNode.

cancellationToken CancellationToken
The CancellationToken that will be observed while retrieving symbolic info from the semanticModel.

Returns

GenericSymbolWithSyntax?

null, if semanticModel does not resolve syntaxNode to a generic symbol or the symbol is the original symbol definition; otherwise, the new instance.

⚠️ **GitHub.com Fallback** ⚠️