4 instantiations of CompletionTrigger
Microsoft.CodeAnalysis.Features (4)
Completion\CompletionTrigger.cs (4)
43new(CompletionTriggerKind.Other); 49new(CompletionTriggerKind.Invoke); 55=> new(CompletionTriggerKind.Insertion, insertedCharacter); 61=> new(CompletionTriggerKind.Deletion, deletedCharacter);
163 references to CompletionTrigger
Microsoft.AspNetCore.App.Analyzers (4)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (2)
51public override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options) 485public readonly CompletionTrigger Trigger;
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (2)
45public override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options) 334public readonly CompletionTrigger Trigger;
Microsoft.AspNetCore.App.Analyzers.Test (25)
Dependencies\ExtensionMethodsCompletionProviderTests.cs (8)
16[CompletionTrigger.Invoke], 22public async Task ProvidesAddOpenApiCompletion(CompletionTrigger trigger) 45public async Task ProvidesAddOpenApiCompletionWithPartialToken(CompletionTrigger trigger) 68public async Task DoesNotProvideCompletionIfNoStringMatchForServices(CompletionTrigger trigger) 91public async Task ProvidesMapOpenApiCompletion(CompletionTrigger trigger) 114public async Task ProvidesMapOpenApiCompletionWithPartialToken(CompletionTrigger trigger) 137public async Task DoesNotProvideCompletionIfNoStringMatchForWebApplication(CompletionTrigger trigger) 158private Task<CompletionResult> GetCompletionsAndServiceAsync(string source, CompletionTrigger? completionTrigger = null)
RouteEmbeddedLanguage\FrameworkParametersCompletionProviderTests.cs (5)
200", CompletionTrigger.Invoke); 228", CompletionTrigger.Invoke); 256", CompletionTrigger.Invoke); 990", CompletionTrigger.Invoke); 1094private Task<CompletionResult> GetCompletionsAndServiceAsync(string source, CompletionTrigger? completionTrigger = null)
RouteEmbeddedLanguage\Infrastructure\CompletionTestHelpers.cs (1)
10public static async Task<CompletionResult> GetCompletionsAndServiceAsync(TestDiagnosticAnalyzerRunner runner, string source, CompletionTrigger? completionTrigger = null)
RouteEmbeddedLanguage\RoutePatternCompletionProviderTests.cs (9)
91", CompletionTrigger.Invoke); 116", CompletionTrigger.Invoke); 145", CompletionTrigger.Invoke); 174", CompletionTrigger.Invoke); 336", CompletionTrigger.Invoke); 654", CompletionTrigger.Invoke); 676", CompletionTrigger.Invoke); 702", CompletionTrigger.Invoke); 709private Task<CompletionResult> GetCompletionsAndServiceAsync(string source, CompletionTrigger? completionTrigger = null)
TestDiagnosticAnalyzer.cs (2)
43return GetCompletionsAndServiceAsync(caretPosition, CompletionTrigger.CreateInsertionTrigger(insertionChar), sources); 46public async Task<CompletionResult> GetCompletionsAndServiceAsync(int caretPosition, CompletionTrigger completionTrigger, params string[] sources)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (27)
Completion\CompletionProviders\AbstractCSharpCompletionProviderTests.cs (2)
19using RoslynTrigger = Microsoft.CodeAnalysis.Completion.CompletionTrigger; 186var completionList = await GetCompletionListAsync(service, document, position, RoslynTrigger.Invoke);
Completion\CompletionProviders\CrefCompletionProviderTests.cs (2)
20using RoslynTrigger = Microsoft.CodeAnalysis.Completion.CompletionTrigger; 462var completionList = await GetCompletionListAsync(service, document, hostDocument.CursorPosition!.Value, RoslynTrigger.Invoke);
Completion\CompletionProviders\ObjectInitializerCompletionProviderTests.cs (4)
691var triggerInfo = CompletionTrigger.CreateInsertionTrigger('a'); 1283var triggerInfo = CompletionTrigger.CreateInsertionTrigger('a');
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (9)
2471var triggerInfo = CompletionTrigger.Invoke; 2724var triggerInfo = CompletionTrigger.Invoke; 2779var triggerInfo = CompletionTrigger.Invoke; 3065var completionList = await GetCompletionListAsync(service, document, testDocument.CursorPosition.Value, CompletionTrigger.Invoke); 3201var completionList = await GetCompletionListAsync(service, document, testDocument.CursorPosition.Value, CompletionTrigger.Invoke); 3255var completionList = await GetCompletionListAsync(service, document, testDocument.CursorPosition.Value, CompletionTrigger.Invoke);
Completion\CompletionProviders\SuggestionModeCompletionProviderTests.cs (5)
1523var triggerInfos = new List<CompletionTrigger> 1525CompletionTrigger.CreateInsertionTrigger('a'), 1526CompletionTrigger.Invoke, 1527CompletionTrigger.CreateDeletionTrigger('z') 1533foreach (var triggerInfo in triggerInfos)
Completion\CompletionServiceTests.cs (5)
80public override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options) 115service.ShouldTriggerCompletion(text, 1, CompletionTrigger.Invoke, options: options); 118await service.GetCompletionsAsync(document, 1, CompletionTrigger.Invoke, options: options); 142service.ShouldTriggerCompletion(text, 1, CompletionTrigger.Invoke, options: null); 145await service.GetCompletionsAsync(document, 1, CompletionTrigger.Invoke, options: null);
Microsoft.CodeAnalysis.CSharp.Features (3)
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (1)
36Document document, int position, TextSpan itemSpan, CompletionTrigger trigger, CancellationToken cancellationToken = default)
Completion\CompletionProviders\SymbolCompletionProvider.cs (1)
149internal override async Task<bool> IsSyntacticTriggerCharacterAsync(Document document, int caretPosition, CompletionTrigger trigger, CompletionOptions options, CancellationToken cancellationToken)
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (1)
70CompletionTrigger trigger, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.EditorFeatures (5)
IntelliSense\AsyncCompletion\CompletionSource.cs (1)
165var roslynTrigger = Helpers.GetRoslynTrigger(trigger, triggerLocation);
IntelliSense\AsyncCompletion\Helpers.cs (4)
14using RoslynTrigger = Microsoft.CodeAnalysis.Completion.CompletionTrigger; 66public static RoslynTrigger GetRoslynTrigger(EditorAsyncCompletionData.CompletionTrigger trigger, SnapshotPoint triggerLocation) 84return RoslynTrigger.CreateDeletionTrigger(characterRemoved); 87return RoslynTrigger.CreateInsertionTrigger(trigger.Character);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (19)
Completion\AbstractCompletionProviderTests.cs (19)
136RoslynCompletion.CompletionTrigger triggerInfo, 179var trigger = RoslynCompletion.CompletionTrigger.Invoke; 183trigger = RoslynCompletion.CompletionTrigger.CreateInsertionTrigger(insertedCharacter: code.ElementAt(position - 1)); 187trigger = RoslynCompletion.CompletionTrigger.CreateDeletionTrigger(deletedCharacter: deletedCharTrigger.Value); 374return await GetCompletionListAsync(GetCompletionService(currentDocument.Project), currentDocument, position, RoslynCompletion.CompletionTrigger.Invoke, options).ConfigureAwait(false); 613var completionList = await GetCompletionListAsync(service, document, position, RoslynCompletion.CompletionTrigger.Invoke); 737var completionList = await GetCompletionListAsync(service, document, position, RoslynCompletion.CompletionTrigger.Invoke); 963var triggerInfo = RoslynCompletion.CompletionTrigger.Invoke; 1018var triggerInfo = RoslynCompletion.CompletionTrigger.Invoke; 1048var triggerInfo = RoslynCompletion.CompletionTrigger.Invoke; 1275var trigger = RoslynCompletion.CompletionTrigger.CreateInsertionTrigger(text[position]); 1327var completionList = await GetCompletionListAsync(service, document, position, RoslynCompletion.CompletionTrigger.Invoke); 1354? RoslynCompletion.CompletionTrigger.CreateInsertionTrigger(insertedCharacter: code.ElementAt(position - 1)) 1355: RoslynCompletion.CompletionTrigger.Invoke;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Completion\CompletionServiceTests.cs (1)
101public override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (14)
IntelliSense\CompletionServiceTests.vb (4)
40document, caretPosition:=0, CompletionOptions.Default, OptionSet.Empty, CompletionTrigger.Invoke) 77Public Overrides Function ShouldTriggerCompletion(text As SourceText, position As Int32, trigger As CompletionTrigger, options As OptionSet) As [Boolean] 105document, caretPosition:=0, CompletionOptions.Default, OptionSet.Empty, CompletionTrigger.Invoke, 128Friend Overrides Function ShouldTriggerCompletion(languageServices As CodeAnalysis.Host.LanguageServices, text As SourceText, caretPosition As Integer, trigger As CompletionTrigger, options As CompletionOptions, passThroughOptions As OptionSet) As Boolean
IntelliSense\CompletionServiceTests_Exclusivitiy.vb (2)
45document, caretPosition:=0, CompletionOptions.Default, OptionSet.Empty, CompletionTrigger.Invoke) 85Public Overrides Function ShouldTriggerCompletion(text As SourceText, position As Int32, trigger As CompletionTrigger, options As OptionSet) As [Boolean]
IntelliSense\CSharpCompletionCommandHandlerTests.vb (5)
8225Public Overrides Function ShouldTriggerCompletion(text As SourceText, caretPosition As Integer, trigger As CompletionTrigger, options As OptionSet) As Boolean 8270Public Overrides Function ShouldTriggerCompletion(text As SourceText, caretPosition As Integer, trigger As CompletionTrigger, options As OptionSet) As Boolean 9612Public Overrides Function ShouldTriggerCompletion(text As SourceText, caretPosition As Integer, trigger As CompletionTrigger, options As OptionSet) As Boolean 10775Public Overrides Function ShouldTriggerCompletion(text As SourceText, caretPosition As Integer, trigger As CompletionTrigger, options As OptionSet) As Boolean 11624document, caretPosition:=cursorPosition, CompletionOptions.Default, OptionSet.Empty, CompletionTrigger.Invoke)
IntelliSense\CSharpCompletionCommandHandlerTests_DefaultsSource.vb (3)
440Public Overrides Function ShouldTriggerCompletion(text As SourceText, caretPosition As Integer, trigger As CompletionTrigger, options As OptionSet) As Boolean 666Optional trigger As CompletionTrigger = Nothing, 690trigger As CompletionTrigger,
Microsoft.CodeAnalysis.ExternalAccess.FSharp (3)
Completion\FSharpCompletionProviderBase.cs (3)
14public sealed override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options) 17internal sealed override bool ShouldTriggerCompletion(Host.LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passthroughOptions) 20protected abstract bool ShouldTriggerCompletionImpl(SourceText text, int caretPosition, CompletionTrigger trigger);
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (2)
Completion\OmniSharpCompletionService.cs (2)
19CompletionTrigger trigger, 32CompletionTrigger trigger,
Microsoft.CodeAnalysis.Features (36)
Completion\CommonCompletionProvider.cs (3)
34public sealed override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options) 42internal override bool ShouldTriggerCompletion(LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passThroughOptions) 45private bool ShouldTriggerCompletionImpl(SourceText text, int caretPosition, CompletionTrigger trigger, in CompletionOptions options)
Completion\CompletionContext.cs (4)
59/// be overwritten during <see cref="CompletionService.GetCompletionsAsync(Document, int, CompletionTrigger, ImmutableHashSet{string}, OptionSet, CancellationToken)"/>. 72public CompletionTrigger Trigger { get; } 117CompletionTrigger trigger, 144CompletionTrigger trigger,
Completion\CompletionProvider.cs (3)
36public virtual bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options) 47internal virtual bool ShouldTriggerCompletion(LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passThroughOptions) 57internal virtual async Task<bool> IsSyntacticTriggerCharacterAsync(Document document, int caretPosition, CompletionTrigger trigger, CompletionOptions options, CancellationToken cancellationToken)
Completion\CompletionService.cs (3)
97CompletionTrigger trigger, 136CompletionTrigger trigger, 413CompletionTrigger triggerInfo,
Completion\CompletionService.ProviderManager.cs (2)
167Project? project, ImmutableHashSet<string>? roles, CompletionTrigger trigger, in CompletionOptions options) 176CompletionTrigger trigger,
Completion\CompletionService_GetCompletions.cs (3)
40CompletionTrigger trigger = default, 67CompletionTrigger trigger = default, 130Document document, ConcatImmutableArray<CompletionProvider> providers, int caretPosition, CompletionOptions options, CompletionTrigger trigger, ImmutableHashSet<string>? roles, SourceText text)
Completion\CompletionTrigger.cs (7)
42public static readonly CompletionTrigger Default = 46/// The default <see cref="CompletionTrigger"/> when none is specified. 48public static readonly CompletionTrigger Invoke = 52/// Creates a new instance of a <see cref="CompletionTrigger"/> association with the insertion of a typed character into the document. 54public static CompletionTrigger CreateInsertionTrigger(char insertedCharacter) 58/// Creates a new instance of a <see cref="CompletionTrigger"/> association with the deletion of a character from the document. 60public static CompletionTrigger CreateDeletionTrigger(char deletedCharacter)
Completion\Providers\AbstractAggregateEmbeddedLanguageCompletionProvider.cs (1)
73internal sealed override bool ShouldTriggerCompletion(LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passThroughOptions)
Completion\Providers\AbstractDocCommentCompletionProvider.cs (1)
91protected abstract Task<IEnumerable<CompletionItem>?> GetItemsWorkerAsync(Document document, int position, CompletionTrigger trigger, CancellationToken cancellationToken);
Completion\Providers\AbstractSuggestionModeCompletionProvider.cs (1)
14protected abstract Task<CompletionItem?> GetSuggestionModeItemAsync(Document document, int position, TextSpan span, CompletionTrigger triggerInfo, CancellationToken cancellationToken);
Completion\Providers\EmbeddedLanguageCompletionProvider.cs (1)
22public abstract bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger);
Completion\Providers\Scripting\AbstractDirectivePathCompletionProvider.cs (1)
66public sealed override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options)
EmbeddedLanguages\DateAndTime\DateAndTimeEmbeddedCompletionProvider.cs (1)
36public override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger)
EmbeddedLanguages\RegularExpressions\LanguageServices\EmbeddedCompletionContext.cs (1)
25public readonly CompletionTrigger Trigger;
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexEmbeddedCompletionProvider.cs (1)
43public override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger)
ExternalAccess\VSTypeScript\Api\VSTypeScriptCompletionProvider.cs (3)
15public sealed override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options) 21internal sealed override bool ShouldTriggerCompletion(LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passThroughOptions) 24protected abstract bool ShouldTriggerCompletionImpl(SourceText text, int caretPosition, CompletionTrigger trigger, bool triggerOnTypingLetters);
Microsoft.CodeAnalysis.LanguageServer.Protocol (16)
Extensions\ProtocolConversions.cs (9)
121public static async Task<Completion.CompletionTrigger> LSPToRoslynCompletionTriggerAsync( 130return Completion.CompletionTrigger.Invoke; 136return Completion.CompletionTrigger.Invoke; 142return Completion.CompletionTrigger.Invoke; 146return Completion.CompletionTrigger.CreateInsertionTrigger(insertionChar); 151return Completion.CompletionTrigger.CreateDeletionTrigger(triggerChar); 156return Completion.CompletionTrigger.Invoke; 163return Completion.CompletionTrigger.CreateInsertionTrigger(triggerChar); 169return Completion.CompletionTrigger.Invoke;
Handler\Completion\CompletionHandler.cs (7)
84var completionTrigger = await ProtocolConversions 125var completionTrigger = await ProtocolConversions.LSPToRoslynCompletionTriggerAsync(context, document, position, cancellationToken).ConfigureAwait(false); 133var originalTrigger = CompletionTrigger.Invoke; 170CompletionTrigger completionTrigger, 192CompletionTrigger completionTrigger, 263static CompletionFilterReason GetFilterReason(CompletionTrigger trigger)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (6)
Completion\CompletionFeaturesTests.cs (4)
583Project project, LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, 595CompletionTrigger trigger = default, ImmutableHashSet<string> roles = null, CancellationToken cancellationToken = default) 876Project project, LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, 888CompletionTrigger trigger = default, ImmutableHashSet<string> roles = null, CancellationToken cancellationToken = default)
Completion\CompletionResolveTests.cs (2)
493CompletionTrigger trigger = default, 511internal override bool ShouldTriggerCompletion(Project project, LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CodeAnalysis.Completion.CompletionOptions options, OptionSet passthroughOptions, ImmutableHashSet<string> roles = null)
Microsoft.CodeAnalysis.VisualBasic.Features (2)
Completion\CompletionProviders\VisualBasicSuggestionModeCompletionProvider.vb (1)
33Protected Overrides Async Function GetSuggestionModeItemAsync(document As Document, position As Integer, itemSpan As TextSpan, trigger As CompletionTrigger, cancellationToken As CancellationToken) As Task(Of CompletionItem)
Completion\CompletionProviders\XmlDocCommentCompletionProvider.vb (1)
68Protected Overrides Async Function GetItemsWorkerAsync(document As Document, position As Integer, trigger As CompletionTrigger, cancellationToken As CancellationToken) As Task(Of IEnumerable(Of CompletionItem))