SymbolFinder.FindReferencesAsync 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
FindReferencesAsync(ISymbol, Solution, CancellationToken) |
Finds all references to a symbol throughout a solution |
FindReferencesAsync(ISymbol, Solution, IImmutableSet<Document>, CancellationToken) |
Finds all references to a symbol throughout a solution |
FindReferencesAsync(ISymbol, Solution, IFindReferencesProgress, IImmutableSet<Document>, CancellationToken) |
Finds all references to a symbol throughout a solution |
FindReferencesAsync(ISymbol, Solution, CancellationToken)
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
Finds all references to a symbol throughout a solution
public static System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.FindSymbols.ReferencedSymbol>> FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, System.Threading.CancellationToken cancellationToken = default);
static member FindReferencesAsync : Microsoft.CodeAnalysis.ISymbol * Microsoft.CodeAnalysis.Solution * System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<Microsoft.CodeAnalysis.FindSymbols.ReferencedSymbol>>
Public Shared Function FindReferencesAsync (symbol As ISymbol, solution As Solution, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IEnumerable(Of ReferencedSymbol))
Parameters
- symbol
- ISymbol
The symbol to find references to.
- solution
- Solution
The solution to find references within.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
Applies to
FindReferencesAsync(ISymbol, Solution, IImmutableSet<Document>, CancellationToken)
Finds all references to a symbol throughout a solution
public static System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.FindSymbols.ReferencedSymbol>> FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, System.Collections.Immutable.IImmutableSet<Microsoft.CodeAnalysis.Document> documents, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.FindSymbols.ReferencedSymbol>> FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, System.Collections.Immutable.IImmutableSet<Microsoft.CodeAnalysis.Document>? documents, System.Threading.CancellationToken cancellationToken = default);
static member FindReferencesAsync : Microsoft.CodeAnalysis.ISymbol * Microsoft.CodeAnalysis.Solution * System.Collections.Immutable.IImmutableSet<Microsoft.CodeAnalysis.Document> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<Microsoft.CodeAnalysis.FindSymbols.ReferencedSymbol>>
Public Shared Function FindReferencesAsync (symbol As ISymbol, solution As Solution, documents As IImmutableSet(Of Document), Optional cancellationToken As CancellationToken = Nothing) As Task(Of IEnumerable(Of ReferencedSymbol))
Parameters
- symbol
- ISymbol
The symbol to find references to.
- solution
- Solution
The solution to find references within.
- documents
- IImmutableSet<Document>
A set of documents to be searched. If documents is null, then that means "all documents".
- cancellationToken
- CancellationToken
A cancellation token.
Returns
Applies to
FindReferencesAsync(ISymbol, Solution, IFindReferencesProgress, IImmutableSet<Document>, CancellationToken)
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
- Source:
- SymbolFinder.cs
Finds all references to a symbol throughout a solution
public static System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.FindSymbols.ReferencedSymbol>> FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress progress, System.Collections.Immutable.IImmutableSet<Microsoft.CodeAnalysis.Document> documents, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.FindSymbols.ReferencedSymbol>> FindReferencesAsync (Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.Solution solution, Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress? progress, System.Collections.Immutable.IImmutableSet<Microsoft.CodeAnalysis.Document>? documents, System.Threading.CancellationToken cancellationToken = default);
static member FindReferencesAsync : Microsoft.CodeAnalysis.ISymbol * Microsoft.CodeAnalysis.Solution * Microsoft.CodeAnalysis.FindSymbols.IFindReferencesProgress * System.Collections.Immutable.IImmutableSet<Microsoft.CodeAnalysis.Document> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<Microsoft.CodeAnalysis.FindSymbols.ReferencedSymbol>>
Public Shared Function FindReferencesAsync (symbol As ISymbol, solution As Solution, progress As IFindReferencesProgress, documents As IImmutableSet(Of Document), Optional cancellationToken As CancellationToken = Nothing) As Task(Of IEnumerable(Of ReferencedSymbol))
Parameters
- symbol
- ISymbol
The symbol to find references to.
- solution
- Solution
The solution to find references within.
- progress
- IFindReferencesProgress
An optional progress object that will receive progress information as the search is undertaken.
- documents
- IImmutableSet<Document>
An optional set of documents to be searched. If documents is null, then that means "all documents".
- cancellationToken
- CancellationToken
An optional cancellation token.
Returns
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for