public async Task <IEnumerable <string> > GetRefactoringFilesAsync(string identifier, CancellationToken cancellationToken = default) { ISymbol symbol = RefactoringIdentifiers.First(f => f.Name == identifier); IEnumerable <ReferencedSymbol> referencedSymbols = await SymbolFinder.FindReferencesAsync(symbol, Solution, cancellationToken).ConfigureAwait(false); return(GetFilePaths(referencedSymbols)); }
public async Task <IEnumerable <string> > GetRefactoringFilesAsync(string identifier, CancellationToken cancellationToken = default) { ISymbol symbol = RefactoringIdentifiers.FirstOrDefault(f => f.Name == identifier); if (symbol == null) { throw new InvalidOperationException($"Refactoring identifier symbol not found for identifier '{identifier}'."); } IEnumerable <ReferencedSymbol> referencedSymbols = await SymbolFinder.FindReferencesAsync(symbol, Solution, cancellationToken).ConfigureAwait(false); return(GetFilePaths(referencedSymbols)); }