public async Task FindImplementationsAsync(Document document, int position, IFindUsagesContext context) { var tuple = await FindUsagesHelpers.FindImplementationsAsync( document, position, context.CancellationToken).ConfigureAwait(false); if (tuple == null) { context.ReportMessage(EditorFeaturesResources.Cannot_navigate_to_the_symbol_under_the_caret); return; } var message = tuple.Value.message; if (message != null) { context.ReportMessage(message); return; } var project = tuple.Value.project; foreach (var implementation in tuple.Value.implementations) { var definitionItem = implementation.ToDefinitionItem( project.Solution, includeHiddenLocations: false); await context.OnDefinitionFoundAsync(definitionItem).ConfigureAwait(false); } }
public async Task FindImplementationsAsync(Document document, int position, IFindUsagesContext context) { var tuple = await FindUsagesHelpers.FindImplementationsAsync( document, position, context.CancellationToken).ConfigureAwait(false); if (tuple == null) { context.ReportMessage(EditorFeaturesResources.Cannot_navigate_to_the_symbol_under_the_caret); return; } var message = tuple.Value.message; if (message != null) { context.ReportMessage(message); return; } context.SetSearchTitle(string.Format(EditorFeaturesResources._0_implementations, FindUsagesHelpers.GetDisplayName(tuple.Value.symbol))); var project = tuple.Value.project; foreach (var implementation in tuple.Value.implementations) { var definitionItem = implementation.ToDefinitionItem( project.Solution, includeHiddenLocations: false); await context.OnDefinitionFoundAsync(definitionItem).ConfigureAwait(false); } }