281 references to FixAllScope
BuildActionTelemetryTable (7)
src\Workspaces\Core\Portable\Shared\Extensions\TelemetryExtensions.cs (7)
41public static short GetScopeIdForTelemetry(this FixAllScope scope) 44FixAllScope.Document => 1, 45FixAllScope.Project => 2, 46FixAllScope.Solution => 3, 47FixAllScope.Custom => 4, 48FixAllScope.ContainingMember => 5, 49FixAllScope.ContainingType => 6,
Microsoft.Analyzers.Extra.Tests (1)
Resources\RoslynTestUtils.cs (1)
444scope: FixAllScope.Project,
Microsoft.Analyzers.Local.Tests (1)
Resources\RoslynTestUtils.cs (1)
445scope: FixAllScope.Project,
Microsoft.CodeAnalysis.CodeStyle.Fixes (17)
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (3)
32FixAllScope.Document when fixAllContext.Document is not null => await fixAllContext.GetDocumentDiagnosticsAsync(fixAllContext.Document).ConfigureAwait(false), 33FixAllScope.Project => await fixAllContext.GetAllDiagnosticsAsync(fixAllContext.Project).ConfigureAwait(false), 34FixAllScope.Solution => await GetSolutionDiagnosticsAsync(fixAllContext).ConfigureAwait(false),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (6)
18private static readonly ImmutableArray<FixAllScope> s_defaultSupportedFixAllScopes = 19[FixAllScope.Document, FixAllScope.Project, FixAllScope.Solution, FixAllScope.ContainingMember, FixAllScope.ContainingType];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\FixAllHelper.cs (8)
6using FixAllScope = Microsoft.CodeAnalysis.CodeFixes.FixAllScope; 13FixAllScope fixAllScope, 20FixAllScope.Custom => string.Format(WorkspaceExtensionsResources.Fix_all_0, title), 21FixAllScope.Document => string.Format(WorkspaceExtensionsResources.Fix_all_0_in_1, title, triggerDocument.Name), 22FixAllScope.Project => string.Format(WorkspaceExtensionsResources.Fix_all_0_in_1, title, triggerProject.Name), 23FixAllScope.Solution => string.Format(WorkspaceExtensionsResources.Fix_all_0_in_Solution, title), 24FixAllScope.ContainingMember => string.Format(WorkspaceExtensionsResources.Fix_all_0_in_Containing_member, title), 25FixAllScope.ContainingType => string.Format(WorkspaceExtensionsResources.Fix_all_0_in_Containing_type, title),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
Formatting\CodeCleanupTests.TestFixers.cs (4)
136public override IEnumerable<FixAllScope> GetSupportedFixAllScopes() 138return new[] { FixAllScope.Project, FixAllScope.Solution, FixAllScope.Custom };
Microsoft.CodeAnalysis.CSharp.Features (10)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.FixAllProvider.cs (4)
14using FixAllScope = Microsoft.CodeAnalysis.CodeFixes.FixAllScope; 31public override IEnumerable<FixAllScope> GetSupportedFixAllScopes() 32=> ImmutableArray.Create(FixAllScope.Solution); 36Debug.Assert(fixAllContext.Scope == FixAllScope.Solution);
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (1)
44protected override ImmutableArray<FixAllScope> SupportedFixAllScopes => AllFixAllScopes;
ConvertNamespace\ConvertNamespaceCodeRefactoringProvider.cs (3)
32protected override ImmutableArray<FixAllScope> SupportedFixAllScopes 33=> [FixAllScope.Project, FixAllScope.Solution];
ConvertToRawString\ConvertStringToRawStringCodeRefactoringProvider.cs (1)
43protected override ImmutableArray<FixAllScope> SupportedFixAllScopes => AllFixAllScopes;
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (1)
56protected override ImmutableArray<FixAllScope> SupportedFixAllScopes => AllFixAllScopes;
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (4)
AddFileBanner\AddFileBannerTests_FixAll.cs (4)
299[InlineData(FixAllScope.ContainingMember)] 300[InlineData(FixAllScope.ContainingType)] 301[InlineData(FixAllScope.Document)] 302public async Task FixAllScopes_NotApplicable(FixAllScope fixAllScope)
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
CodeActions\OmniSharpCodeFixContextFactory.cs (1)
43FixAllScope scope,
Microsoft.CodeAnalysis.Features (22)
AddFileBanner\AbstractAddFileBannerCodeRefactoringProvider.cs (3)
32protected sealed override ImmutableArray<FixAllScope> SupportedFixAllScopes { get; } 33= [FixAllScope.Project, FixAllScope.Solution];
CodeFixes\CodeFixCollection.cs (2)
21ImmutableArray<FixAllScope> supportedScopes, 32public ImmutableArray<FixAllScope> SupportedScopes { get; } = supportedScopes.NullToEmpty();
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.FixAllProvider.cs (6)
25public override IEnumerable<FixAllScope> GetSupportedFixAllScopes() 26=> ImmutableArray.Create(FixAllScope.Document, FixAllScope.Project, 27FixAllScope.Solution, FixAllScope.ContainingMember, FixAllScope.ContainingType);
CodeFixesAndRefactorings\AbstractFixAllCodeAction.cs (6)
11using FixAllScope = Microsoft.CodeAnalysis.CodeFixes.FixAllScope; 45FixAllScope.Document => FeaturesResources.Document, 46FixAllScope.Project => FeaturesResources.Project, 47FixAllScope.Solution => FeaturesResources.Solution, 48FixAllScope.ContainingMember => FeaturesResources.Containing_Member, 49FixAllScope.ContainingType => FeaturesResources.Containing_Type,
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (1)
32protected sealed override ImmutableArray<FixAllScope> SupportedFixAllScopes => AllFixAllScopes;
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (3)
32FixAllScope.Document when fixAllContext.Document is not null => await fixAllContext.GetDocumentDiagnosticsAsync(fixAllContext.Document).ConfigureAwait(false), 33FixAllScope.Project => await fixAllContext.GetAllDiagnosticsAsync(fixAllContext.Project).ConfigureAwait(false), 34FixAllScope.Solution => await GetSolutionDiagnosticsAsync(fixAllContext).ConfigureAwait(false),
SyncNamespaces\AbstractSyncNamespacesService.cs (1)
128FixAllScope.Solution,
Microsoft.CodeAnalysis.LanguageServer.Protocol (9)
Features\CodeFixes\CodeFixService.cs (3)
313if (collection.FixAllState is not null && collection.SupportedScopes.Contains(FixAllScope.Document)) 768var supportedScopes = ImmutableArray<FixAllScope>.Empty; 787FixAllScope.Document,
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (6)
212ImmutableArray<FixAllScope> supportedScopes, 230foreach (var scope in supportedScopes) 232if (scope is FixAllScope.ContainingMember or FixAllScope.ContainingType) 609if (scope is FixAllScope.ContainingMember or FixAllScope.ContainingType)
Microsoft.CodeAnalysis.Workspaces (185)
CodeActions\CodeAction.cs (2)
208internal Guid GetTelemetryId(FixAllScope? fixAllScope = null) 598/// This is used in <see cref="GetTelemetryId(FixAllScope?)"/> to determine the appropriate type
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (10)
30public override IEnumerable<FixAllScope> GetSupportedFixAllScopes() 31=> ImmutableArray.Create(FixAllScope.Document, FixAllScope.Project, 32FixAllScope.Solution, FixAllScope.ContainingMember, FixAllScope.ContainingType); 57Contract.ThrowIfFalse(fixAllContext.Scope is FixAllScope.Document or 58FixAllScope.Project or FixAllScope.ContainingMember or FixAllScope.ContainingType);
CodeFixes\FixAllOccurrences\DocumentBasedFixAllProvider.cs (3)
28public abstract class DocumentBasedFixAllProvider(ImmutableArray<FixAllScope> supportedFixAllScopes) : FixAllProvider 30private readonly ImmutableArray<FixAllScope> _supportedFixAllScopes = supportedFixAllScopes; 60public sealed override IEnumerable<FixAllScope> GetSupportedFixAllScopes()
CodeFixes\FixAllOccurrences\FixAllContext.cs (18)
48/// <see cref="FixAllScope"/> to fix all occurrences. 50public FixAllScope Scope => State.Scope; 86Optional<FixAllScope> scope, 96/// This overload cannot be used with <see cref="FixAllScope.ContainingMember"/> or 97/// <see cref="FixAllScope.ContainingType"/> value for the <paramref name="scope"/>. 105/// <param name="scope"><see cref="FixAllScope"/> to fix all occurrences.</param> 115FixAllScope scope, 125if (scope is FixAllScope.ContainingMember or FixAllScope.ContainingType) 135/// using <see cref="FixAllScope.ContainingMember"/> or <see cref="FixAllScope.ContainingType"/> 142/// <param name="scope"><see cref="FixAllScope"/> to fix all occurrences.</param> 153FixAllScope scope, 178/// <param name="scope"><see cref="FixAllScope"/> to fix all occurrences.</param> 188FixAllScope scope, 205if (scope is FixAllScope.ContainingMember or FixAllScope.ContainingType) 335Optional<FixAllScope> scope = default,
CodeFixes\FixAllOccurrences\FixAllContext.DiagnosticProvider.cs (2)
80case FixAllScope.Project: 84case FixAllScope.Solution:
CodeFixes\FixAllOccurrences\FixAllContext.SpanBasedDiagnosticProvider.cs (2)
21/// We need to compute diagnostics for a span when applying a fix all operation in <see cref="FixAllScope.ContainingMember"/> 22/// and <see cref="FixAllScope.ContainingType"/> scopes.
CodeFixes\FixAllOccurrences\FixAllContextHelper.cs (5)
35case FixAllScope.Document: 45case FixAllScope.ContainingMember or FixAllScope.ContainingType: 61case FixAllScope.Project: 65case FixAllScope.Solution:
CodeFixes\FixAllOccurrences\FixAllProvider.cs (13)
21private protected static ImmutableArray<FixAllScope> DefaultSupportedFixAllScopes 22= [FixAllScope.Document, FixAllScope.Project, FixAllScope.Solution]; 27/// (a) <see cref="FixAllScope.Document"/> 28/// (b) <see cref="FixAllScope.Project"/> and 29/// (c) <see cref="FixAllScope.Solution"/> 31public virtual IEnumerable<FixAllScope> GetSupportedFixAllScopes() 73/// Supported <see cref="FixAllScope"/>s for the fix all provider. 74/// Note that <see cref="FixAllScope.Custom"/> is not supported by the <see cref="DocumentBasedFixAllProvider"/> 79ImmutableArray<FixAllScope> supportedFixAllScopes) 87if (supportedFixAllScopes.Contains(FixAllScope.Custom)) 100ImmutableArray<FixAllScope> supportedFixAllScopes) : DocumentBasedFixAllProvider(supportedFixAllScopes)
CodeFixes\FixAllOccurrences\FixAllState.cs (6)
33FixAllScope scope, 40Debug.Assert(diagnosticSpan.HasValue || scope is not FixAllScope.ContainingMember or FixAllScope.ContainingType); 49protected override FixAllState With(Document? document, Project project, FixAllScope scope, string? codeActionEquivalenceKey) 79FixAllScope.Custom, 100FixAllScope.Custom,
CodeFixes\FixAllOccurrences\WellKnownFixAllProviders.cs (5)
19/// <see cref="FixAllScope.Document"/>, <see cref="FixAllScope.Project"/>, <see cref="FixAllScope.Solution"/> 20/// <see cref="FixAllScope.ContainingMember"/> and <see cref="FixAllScope.ContainingType"/>.
CodeFixesAndRefactorings\CommonFixAllState.cs (7)
8using FixAllScope = Microsoft.CodeAnalysis.CodeFixes.FixAllScope; 23public FixAllScope Scope { get; } 31FixAllScope scope, 44protected abstract TFixAllState With(Document? document, Project project, FixAllScope scope, string? codeActionEquivalenceKey); 48Optional<FixAllScope> scope = default, 52var newScope = scope.HasValue ? scope.Value : Scope; 73Optional<FixAllScope> scope,
CodeFixesAndRefactorings\DefaultFixAllProviderHelpers.cs (6)
37FixAllScope.Document or FixAllScope.ContainingMember or FixAllScope.ContainingType 39FixAllScope.Project => await GetProjectFixesAsync(fixAllContext, fixAllContextsAsync).ConfigureAwait(false), 40FixAllScope.Solution => await GetSolutionFixesAsync(fixAllContext, fixAllContextsAsync).ConfigureAwait(false), 88sortedProjects.SelectAsArray(p => (TFixAllContext)fixAllContext.With((document: null, project: p), scope: FixAllScope.Project)));
CodeFixesAndRefactorings\DocumentBasedFixAllProviderHelpers.cs (4)
80fixAllContext.Scope is FixAllScope.Document or FixAllScope.Project or FixAllScope.ContainingMember or FixAllScope.ContainingType);
CodeFixesAndRefactorings\FixAllLogger.cs (2)
82case CodeFixes.FixAllScope.Project: 86case CodeFixes.FixAllScope.Solution:
CodeFixesAndRefactorings\FixAllProviderInfo.cs (6)
15/// Contains computed information for a given <see cref="FixAllProvider"/>, such as supported diagnostic Ids and supported <see cref="FixAllScope"/>. 20public readonly ImmutableArray<FixAllScope> SupportedScopes; 24ImmutableArray<FixAllScope> supportedScopes) 118ImmutableArray<FixAllScope> supportedScopes) : FixAllProviderInfo(fixAllProvider, supportedScopes) 127ImmutableArray<FixAllScope> supportedScopes) : FixAllProviderInfo(fixAllProvider, supportedScopes) 137ImmutableArray<FixAllScope> supportedScopes) : FixAllProviderInfo(fixAllProvider, supportedScopes)
CodeFixesAndRefactorings\IFixAllContext.cs (2)
22FixAllScope Scope { get; } 30Optional<FixAllScope> scope = default,
CodeFixesAndRefactorings\IFixAllProvider.cs (2)
8using FixAllScope = Microsoft.CodeAnalysis.CodeFixes.FixAllScope; 17IEnumerable<FixAllScope> GetSupportedFixAllScopes();
CodeFixesAndRefactorings\IFixAllState.cs (3)
6using FixAllScope = Microsoft.CodeAnalysis.CodeFixes.FixAllScope; 18FixAllScope Scope { get; } 31Optional<FixAllScope> scope = default,
CodeRefactorings\CodeRefactoringProvider.cs (1)
27/// registered by this code refactoring provider across the supported <see cref="CodeFixes.FixAllScope"/>s.
CodeRefactorings\FixAllOccurences\DocumentBasedFixAllProvider.cs (8)
14using FixAllScope = Microsoft.CodeAnalysis.CodeFixes.FixAllScope; 29internal abstract class DocumentBasedFixAllProvider(ImmutableArray<FixAllScope> supportedFixAllScopes) : FixAllProvider 31private readonly ImmutableArray<FixAllScope> _supportedFixAllScopes = supportedFixAllScopes; 61public sealed override IEnumerable<FixAllScope> GetSupportedFixAllScopes() 84Contract.ThrowIfFalse(fixAllContext.Scope is FixAllScope.Document or FixAllScope.Project 85or FixAllScope.ContainingMember or FixAllScope.ContainingType);
CodeRefactorings\FixAllOccurences\FixAllContext.cs (5)
12using FixAllScope = Microsoft.CodeAnalysis.CodeFixes.FixAllScope; 39/// <see cref="FixAllScope"/> to fix all occurrences. 41public FixAllScope Scope => State.Scope; 76Optional<FixAllScope> scope, 101Optional<FixAllScope> scope = default,
CodeRefactorings\FixAllOccurences\FixAllProvider.cs (14)
12using FixAllScope = Microsoft.CodeAnalysis.CodeFixes.FixAllScope; 24private protected static ImmutableArray<FixAllScope> DefaultSupportedFixAllScopes 25= [FixAllScope.Document, FixAllScope.Project, FixAllScope.Solution]; 30/// (a) <see cref="FixAllScope.Document"/> 31/// (b) <see cref="FixAllScope.Project"/> and 32/// (c) <see cref="FixAllScope.Solution"/> 34public virtual IEnumerable<FixAllScope> GetSupportedFixAllScopes() 73/// Supported <see cref="FixAllScope"/>s for the fix all provider. 74/// Note that <see cref="FixAllScope.Custom"/> is not supported by the <see cref="DocumentBasedFixAllProvider"/> 79ImmutableArray<FixAllScope> supportedFixAllScopes) 87if (supportedFixAllScopes.Contains(FixAllScope.Custom)) 95ImmutableArray<FixAllScope> supportedFixAllScopes) : DocumentBasedFixAllProvider(supportedFixAllScopes)
CodeRefactorings\FixAllOccurences\FixAllState.cs (13)
16using FixAllScope = Microsoft.CodeAnalysis.CodeFixes.FixAllScope; 25/// to compute fix all spans for <see cref="FixAllScope.ContainingMember"/> 26/// and <see cref="FixAllScope.ContainingType"/> scopes. 39FixAllScope fixAllScope, 51FixAllScope fixAllScope, 64FixAllScope fixAllScope, 73protected override FixAllState With(Document? document, Project project, FixAllScope scope, string? codeActionEquivalenceKey) 87/// Gets the spans to fix by document for the <see cref="FixAllScope"/> for this fix all occurences fix. 95case FixAllScope.ContainingType or FixAllScope.ContainingMember: 106case FixAllScope.Document: 111case FixAllScope.Project: 115case FixAllScope.Solution:
CodeRefactorings\SyntaxEditorBasedCodeRefactoringProvider.cs (12)
13using FixAllScope = Microsoft.CodeAnalysis.CodeFixes.FixAllScope; 19protected static readonly ImmutableArray<FixAllScope> DefaultFixAllScopes = [FixAllScope.Document, FixAllScope.Project, FixAllScope.Solution]; 20protected static readonly ImmutableArray<FixAllScope> AllFixAllScopes = [FixAllScope.Document, FixAllScope.Project, FixAllScope.Solution, FixAllScope.ContainingType, FixAllScope.ContainingMember]; 22protected abstract ImmutableArray<FixAllScope> SupportedFixAllScopes { get; }
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (4)
23Document document, TextSpan triggerSpan, FixAllScope fixAllScope, CancellationToken cancellationToken) 25Contract.ThrowIfFalse(fixAllScope is FixAllScope.ContainingMember or FixAllScope.ContainingType); 27var fixAllInContainingMember = fixAllScope == FixAllScope.ContainingMember;
LanguageServices\FixAllSpanMappingService\IFixAllSpanMappingService.cs (9)
15/// Language service for mapping spans for specific <see cref="FixAllScope"/>s for fix all occurences code fix. 16/// Every language that wants to support span based FixAll scopes, such as <see cref="FixAllScope.ContainingMember"/>, 17/// <see cref="FixAllScope.ContainingType"/>, should implement this language service. Non-span based FixAll scopes, 18/// such as <see cref="FixAllScope.Document"/>, <see cref="FixAllScope.Project"/> and <see cref="FixAllScope.Solution"/> 27/// Note that this API is only invoked for span based FixAll scopes, i.e. <see cref="FixAllScope.ContainingMember"/> 28/// and <see cref="FixAllScope.ContainingType"/>. 31Document document, TextSpan triggerSpan, FixAllScope fixAllScope, CancellationToken cancellationToken);
Shared\Extensions\TelemetryExtensions.cs (7)
41public static short GetScopeIdForTelemetry(this FixAllScope scope) 44FixAllScope.Document => 1, 45FixAllScope.Project => 2, 46FixAllScope.Solution => 3, 47FixAllScope.Custom => 4, 48FixAllScope.ContainingMember => 5, 49FixAllScope.ContainingType => 6,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (6)
18private static readonly ImmutableArray<FixAllScope> s_defaultSupportedFixAllScopes = 19[FixAllScope.Document, FixAllScope.Project, FixAllScope.Solution, FixAllScope.ContainingMember, FixAllScope.ContainingType];
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\FixAllHelper.cs (8)
6using FixAllScope = Microsoft.CodeAnalysis.CodeFixes.FixAllScope; 13FixAllScope fixAllScope, 20FixAllScope.Custom => string.Format(WorkspaceExtensionsResources.Fix_all_0, title), 21FixAllScope.Document => string.Format(WorkspaceExtensionsResources.Fix_all_0_in_1, title, triggerDocument.Name), 22FixAllScope.Project => string.Format(WorkspaceExtensionsResources.Fix_all_0_in_1, title, triggerProject.Name), 23FixAllScope.Solution => string.Format(WorkspaceExtensionsResources.Fix_all_0_in_Solution, title), 24FixAllScope.ContainingMember => string.Format(WorkspaceExtensionsResources.Fix_all_0_in_Containing_member, title), 25FixAllScope.ContainingType => string.Format(WorkspaceExtensionsResources.Fix_all_0_in_Containing_type, title),
Microsoft.Interop.ComInterfaceGenerator (8)
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (8)
19case FixAllScope.Document: 21case FixAllScope.Project: 23case FixAllScope.Solution: 52case FixAllScope.ContainingMember: 53case FixAllScope.ContainingType: 54case FixAllScope.Document: 55case FixAllScope.Project: 57case FixAllScope.Solution:
Microsoft.Interop.LibraryImportGenerator (11)
Analyzers\CustomMarshallerAttributeFixer.cs (3)
91case FixAllScope.Document: 93case FixAllScope.Project: 95case FixAllScope.Solution:
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (8)
19case FixAllScope.Document: 21case FixAllScope.Project: 23case FixAllScope.Solution: 52case FixAllScope.ContainingMember: 53case FixAllScope.ContainingType: 54case FixAllScope.Document: 55case FixAllScope.Project: 57case FixAllScope.Solution:
Roslyn.VisualStudio.DiagnosticsWindow (1)
Panels\TelemetryPanel.xaml.cs (1)
57var fixAllScopeValues = Enum.GetValues(typeof(FixAllScope));