protected override async Task ProvideCompletionsAsync(CompletionContext context, string pathThroughLastSlash) { if (GacFileResolver.IsAvailable && pathThroughLastSlash.IndexOfAny(s_pathIndicators) < 0) { var gacHelper = new GlobalAssemblyCacheCompletionHelper(s_rules); context.AddItems(await gacHelper.GetItemsAsync(pathThroughLastSlash, context.CancellationToken).ConfigureAwait(false)); } if (pathThroughLastSlash.IndexOf(',') < 0) { var helper = GetFileSystemCompletionHelper(context.Document, Microsoft.CodeAnalysis.Glyph.Assembly, ImmutableArray.Create(".dll", ".exe"), s_rules); context.AddItems(await helper.GetItemsAsync(pathThroughLastSlash, context.CancellationToken).ConfigureAwait(false)); } }
protected override async Task ProvideCompletionsAsync(CompletionContext context, string pathThroughLastSlash) { if (GacFileResolver.IsAvailable && pathThroughLastSlash.IndexOfAny(s_pathIndicators) < 0) { var gacHelper = new GlobalAssemblyCacheCompletionHelper(s_rules); context.AddItems(await gacHelper.GetItemsAsync(pathThroughLastSlash, context.CancellationToken).ConfigureAwait(false)); } if (pathThroughLastSlash.IndexOf(',') < 0) { var text = await context.Document.GetTextAsync(context.CancellationToken).ConfigureAwait(false); var fileSystemHelper = GetFileSystemCompletionHelper(text, context.Document); context.AddItems(await fileSystemHelper.GetItemsAsync(pathThroughLastSlash, context.CancellationToken).ConfigureAwait(false)); } }