Share via


SymbolFinder.FindSourceDefinitionAsync Method

Definition

Finds the definition symbol declared in source code for a corresponding reference symbol. Returns null if no such symbol can be found in the specified solution.

public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.ISymbol> FindSourceDefinitionAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<Microsoft.CodeAnalysis.ISymbol?> FindSourceDefinitionAsync (Microsoft.CodeAnalysis.ISymbol? symbol, Microsoft.CodeAnalysis.Solution solution, System.Threading.CancellationToken cancellationToken = default);
static member FindSourceDefinitionAsync : Microsoft.CodeAnalysis.ISymbol * Microsoft.CodeAnalysis.Solution * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.ISymbol>
Public Shared Function FindSourceDefinitionAsync (symbol As ISymbol, solution As Solution, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ISymbol)

Parameters

symbol
ISymbol
solution
Solution
cancellationToken
CancellationToken

Returns

Applies to