From 39f4fab0a4db4579e58651957fd60cb2933527e6 Mon Sep 17 00:00:00 2001 From: tmat Date: Wed, 2 Feb 2022 17:55:57 -0800 Subject: [PATCH] Rename --- .../Completion/CommonCompletionProvider.cs | 2 +- .../Portable/Completion/CommonCompletionService.cs | 4 ++-- .../Core/Portable/Completion/CompletionProvider.cs | 4 ++-- .../Core/Portable/Completion/CompletionService.cs | 10 +++++----- .../Completion/CompletionServiceWithProviders.cs | 14 +++++++------- ...tAggregateEmbeddedLanguageCompletionProvider.cs | 2 +- .../Api/VSTypeScriptCompletionProvider.cs | 2 +- .../AbstractSpellCheckCodeFixProvider.cs | 4 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/Features/Core/Portable/Completion/CommonCompletionProvider.cs b/src/Features/Core/Portable/Completion/CommonCompletionProvider.cs index 5e56fa0f95148..ad83b030f2978 100644 --- a/src/Features/Core/Portable/Completion/CommonCompletionProvider.cs +++ b/src/Features/Core/Portable/Completion/CommonCompletionProvider.cs @@ -39,7 +39,7 @@ public sealed override bool ShouldTriggerCompletion(SourceText text, int caretPo return ShouldTriggerCompletionImpl(text, caretPosition, trigger, CompletionOptions.Default); } - internal override bool ShouldTriggerCompletion(HostLanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passthroughOptions) + internal override bool ShouldTriggerCompletion(HostLanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passThroughOptions) => ShouldTriggerCompletionImpl(text, caretPosition, trigger, options); private bool ShouldTriggerCompletionImpl(SourceText text, int caretPosition, CompletionTrigger trigger, in CompletionOptions options) diff --git a/src/Features/Core/Portable/Completion/CommonCompletionService.cs b/src/Features/Core/Portable/Completion/CommonCompletionService.cs index b02bd349f31c3..6f54d8db5db78 100644 --- a/src/Features/Core/Portable/Completion/CommonCompletionService.cs +++ b/src/Features/Core/Portable/Completion/CommonCompletionService.cs @@ -40,12 +40,12 @@ internal override Task GetCompletionsAsync( Document document, int caretPosition, CompletionOptions options, - OptionSet passthroughOptions, + OptionSet passThroughOptions, CompletionTrigger trigger, ImmutableHashSet? roles, CancellationToken cancellationToken) { - return GetCompletionsWithAvailabilityOfExpandedItemsAsync(document, caretPosition, options, passthroughOptions, trigger, roles, cancellationToken); + return GetCompletionsWithAvailabilityOfExpandedItemsAsync(document, caretPosition, options, passThroughOptions, trigger, roles, cancellationToken); } protected static bool IsKeywordItem(CompletionItem item) diff --git a/src/Features/Core/Portable/Completion/CompletionProvider.cs b/src/Features/Core/Portable/Completion/CompletionProvider.cs index fe30be9826557..e23688c70c16f 100644 --- a/src/Features/Core/Portable/Completion/CompletionProvider.cs +++ b/src/Features/Core/Portable/Completion/CompletionProvider.cs @@ -44,9 +44,9 @@ public virtual bool ShouldTriggerCompletion(SourceText text, int caretPosition, /// The position of the caret after the triggering action. /// The triggering action. /// The set of options in effect. - internal virtual bool ShouldTriggerCompletion(HostLanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passthroughOptions) + internal virtual bool ShouldTriggerCompletion(HostLanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passThroughOptions) #pragma warning disable RS0030, CS0618 // Do not used banned/obsolete APIs - => ShouldTriggerCompletion(text, caretPosition, trigger, passthroughOptions); + => ShouldTriggerCompletion(text, caretPosition, trigger, passThroughOptions); #pragma warning restore /// diff --git a/src/Features/Core/Portable/Completion/CompletionService.cs b/src/Features/Core/Portable/Completion/CompletionService.cs index 8949304ef09bc..f7945247ffcd7 100644 --- a/src/Features/Core/Portable/Completion/CompletionService.cs +++ b/src/Features/Core/Portable/Completion/CompletionService.cs @@ -78,7 +78,7 @@ public virtual bool ShouldTriggerCompletion( /// The position of the caret after the triggering action. /// The potential triggering action. /// Options. - /// Options originating either from external caller of the or set externally to . + /// Options originating either from external caller of the or set externally to . /// Optional set of roles associated with the editor state. /// /// We pass the project here to retrieve information about the , @@ -92,11 +92,11 @@ internal virtual bool ShouldTriggerCompletion( int caretPosition, CompletionTrigger trigger, CompletionOptions options, - OptionSet passthroughOptions, + OptionSet passThroughOptions, ImmutableHashSet? roles = null) { Debug.Fail("Backward compat only, should not be called"); - return ShouldTriggerCompletion(text, caretPosition, trigger, roles, passthroughOptions); + return ShouldTriggerCompletion(text, caretPosition, trigger, roles, passThroughOptions); } /// @@ -145,13 +145,13 @@ internal virtual async Task GetCompletionsAsync( Document document, int caretPosition, CompletionOptions options, - OptionSet passthroughOptions, + OptionSet passThroughOptions, CompletionTrigger trigger = default, ImmutableHashSet? roles = null, CancellationToken cancellationToken = default) { #pragma warning disable RS0030 // Do not use banned APIs - return await GetCompletionsAsync(document, caretPosition, trigger, roles, passthroughOptions, cancellationToken).ConfigureAwait(false) ?? CompletionList.Empty; + return await GetCompletionsAsync(document, caretPosition, trigger, roles, passThroughOptions, cancellationToken).ConfigureAwait(false) ?? CompletionList.Empty; #pragma warning restore } diff --git a/src/Features/Core/Portable/Completion/CompletionServiceWithProviders.cs b/src/Features/Core/Portable/Completion/CompletionServiceWithProviders.cs index cb30b2388b64b..41c112bfd8776 100644 --- a/src/Features/Core/Portable/Completion/CompletionServiceWithProviders.cs +++ b/src/Features/Core/Portable/Completion/CompletionServiceWithProviders.cs @@ -97,16 +97,16 @@ protected virtual ImmutableArray GetProviders(ImmutableHashS { // Publicly available options do not affect this API. var completionOptions = CompletionOptions.Default; - var passthroughOptions = options ?? document.Project.Solution.Options; + var passThroughOptions = options ?? document.Project.Solution.Options; - return await GetCompletionsWithAvailabilityOfExpandedItemsAsync(document, caretPosition, completionOptions, passthroughOptions, trigger, roles, cancellationToken).ConfigureAwait(false); + return await GetCompletionsWithAvailabilityOfExpandedItemsAsync(document, caretPosition, completionOptions, passThroughOptions, trigger, roles, cancellationToken).ConfigureAwait(false); } private protected async Task GetCompletionsWithAvailabilityOfExpandedItemsAsync( Document document, int caretPosition, CompletionOptions options, - OptionSet passthroughOptions, + OptionSet passThroughOptions, CompletionTrigger trigger, ImmutableHashSet? roles, CancellationToken cancellationToken) @@ -172,9 +172,9 @@ ImmutableArray GetTriggeredProviders( case CompletionTriggerKind.Insertion: case CompletionTriggerKind.Deletion: - if (ShouldTriggerCompletion(document.Project, document.Project.LanguageServices, text, caretPosition, trigger, options, passthroughOptions, roles)) + if (ShouldTriggerCompletion(document.Project, document.Project.LanguageServices, text, caretPosition, trigger, options, passThroughOptions, roles)) { - var triggeredProviders = providers.Where(p => p.ShouldTriggerCompletion(document.Project.LanguageServices, text, caretPosition, trigger, options, passthroughOptions)).ToImmutableArrayOrEmpty(); + var triggeredProviders = providers.Where(p => p.ShouldTriggerCompletion(document.Project.LanguageServices, text, caretPosition, trigger, options, passThroughOptions)).ToImmutableArrayOrEmpty(); Debug.Assert(ValidatePossibleTriggerCharacterSet(trigger.Kind, triggeredProviders, document, text, caretPosition, options)); return triggeredProviders.IsEmpty ? providers.ToImmutableArray() : triggeredProviders; @@ -220,7 +220,7 @@ public sealed override bool ShouldTriggerCompletion(SourceText text, int caretPo } internal sealed override bool ShouldTriggerCompletion( - Project? project, HostLanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passthroughOptions, ImmutableHashSet? roles = null) + Project? project, HostLanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passThroughOptions, ImmutableHashSet? roles = null) { if (!options.TriggerOnTyping) { @@ -233,7 +233,7 @@ internal sealed override bool ShouldTriggerCompletion( } var providers = _providerManager.GetFilteredProviders(project, roles, trigger, options); - return providers.Any(p => p.ShouldTriggerCompletion(languageServices, text, caretPosition, trigger, options, passthroughOptions)); + return providers.Any(p => p.ShouldTriggerCompletion(languageServices, text, caretPosition, trigger, options, passThroughOptions)); } internal virtual bool SupportsTriggerOnDeletion(CompletionOptions options) diff --git a/src/Features/Core/Portable/Completion/Providers/AbstractAggregateEmbeddedLanguageCompletionProvider.cs b/src/Features/Core/Portable/Completion/Providers/AbstractAggregateEmbeddedLanguageCompletionProvider.cs index bf0f868733eec..0b9a94bc5bb24 100644 --- a/src/Features/Core/Portable/Completion/Providers/AbstractAggregateEmbeddedLanguageCompletionProvider.cs +++ b/src/Features/Core/Portable/Completion/Providers/AbstractAggregateEmbeddedLanguageCompletionProvider.cs @@ -71,7 +71,7 @@ protected ImmutableArray GetLanguageProviders(HostLanguageSer public override ImmutableHashSet TriggerCharacters { get; } - internal sealed override bool ShouldTriggerCompletion(HostLanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passthroughOptions) + internal sealed override bool ShouldTriggerCompletion(HostLanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passThroughOptions) { foreach (var language in GetLanguageProviders(languageServices)) { diff --git a/src/Features/Core/Portable/ExternalAccess/VSTypeScript/Api/VSTypeScriptCompletionProvider.cs b/src/Features/Core/Portable/ExternalAccess/VSTypeScript/Api/VSTypeScriptCompletionProvider.cs index ebc8a5f5a763c..5442c773800ce 100644 --- a/src/Features/Core/Portable/ExternalAccess/VSTypeScript/Api/VSTypeScriptCompletionProvider.cs +++ b/src/Features/Core/Portable/ExternalAccess/VSTypeScript/Api/VSTypeScriptCompletionProvider.cs @@ -18,7 +18,7 @@ public sealed override bool ShouldTriggerCompletion(SourceText text, int caretPo return ShouldTriggerCompletionImpl(text, caretPosition, trigger, CompletionOptions.Default.TriggerOnTypingLetters); } - internal sealed override bool ShouldTriggerCompletion(HostLanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passthroughOptions) + internal sealed override bool ShouldTriggerCompletion(HostLanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passThroughOptions) => ShouldTriggerCompletionImpl(text, caretPosition, trigger, options.TriggerOnTypingLetters); protected abstract bool ShouldTriggerCompletionImpl(SourceText text, int caretPosition, CompletionTrigger trigger, bool triggerOnTypingLetters); diff --git a/src/Features/Core/Portable/SpellCheck/AbstractSpellCheckCodeFixProvider.cs b/src/Features/Core/Portable/SpellCheck/AbstractSpellCheckCodeFixProvider.cs index a9f809304f69a..ed11e7e242821 100644 --- a/src/Features/Core/Portable/SpellCheck/AbstractSpellCheckCodeFixProvider.cs +++ b/src/Features/Core/Portable/SpellCheck/AbstractSpellCheckCodeFixProvider.cs @@ -122,10 +122,10 @@ private async Task CreateSpellCheckCodeIssueAsync( ExpandedCompletionBehavior = ExpandedCompletionMode.NonExpandedItemsOnly }; - var passthroughOptions = document.Project.Solution.Options; + var passThroughOptions = document.Project.Solution.Options; var completionList = await service.GetCompletionsAsync( - document, nameToken.SpanStart, options, passthroughOptions, cancellationToken: cancellationToken).ConfigureAwait(false); + document, nameToken.SpanStart, options, passThroughOptions, cancellationToken: cancellationToken).ConfigureAwait(false); if (completionList.Items.IsEmpty) { return;