src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
46CodeAction.Create(
src\Analyzers\Core\CodeFixes\AddRequiredParentheses\AddRequiredParenthesesCodeFixProvider.cs (1)
34CodeAction.Create(
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
42CodeAction.Create(
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractRemoveDocCommentNodeCodeFixProvider.cs (1)
41CodeAction.Create(
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (1)
36CodeAction.Create(
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (9)
39public async Task<ImmutableArray<CodeAction>> GenerateVariableAsync(
54using var _ = ArrayBuilder<CodeAction>.GetInstance(out var actions);
82return [CodeAction.Create(
96ArrayBuilder<CodeAction> result, SemanticDocument document, State state, CancellationToken cancellationToken)
139private static void GenerateWritableProperty(ArrayBuilder<CodeAction> result, SemanticDocument document, State state)
146private static void AddFieldCodeActions(ArrayBuilder<CodeAction> result, SemanticDocument document, State state)
178private static void GenerateWriteableField(ArrayBuilder<CodeAction> result, SemanticDocument document, State state)
185ArrayBuilder<CodeAction> result, Document document, State state, CancellationToken cancellationToken)
201ArrayBuilder<CodeAction> result, Document document, State state, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
39CodeAction.Create(
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (1)
31CodeAction.Create(
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
55CodeAction.Create(
src\Analyzers\Core\CodeFixes\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsCodeFixProvider.cs (1)
29CodeAction.Create(
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
48CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAtStartCodeFixProvider.cs (1)
48CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\PassInCapturedVariablesAsArgumentsCodeFixProvider.cs (1)
41CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (1)
55CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
75CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementCodeFixProvider.cs (1)
36CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
36CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (1)
36CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (1)
35CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
38CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\RemoveInKeyword\RemoveInKeywordCodeFixProvider.cs (1)
47CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\RemoveNewModifier\RemoveNewModifierCodeFixProvider.cs (1)
49CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\RemoveUnusedLocalFunction\CSharpRemoveUnusedLocalFunctionCodeFixProvider.cs (1)
34CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
55CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
53CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
51CodeAction.Create(
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
59CodeAction.Create(
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (1)
64CodeAction.Create(
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (1)
66CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAtStartCodeFixProvider.cs (1)
48CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\PassInCapturedVariablesAsArgumentsCodeFixProvider.cs (1)
41CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (1)
55CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
75CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementCodeFixProvider.cs (1)
36CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
36CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (1)
36CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (1)
35CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
38CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\RemoveInKeyword\RemoveInKeywordCodeFixProvider.cs (1)
47CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\RemoveNewModifier\RemoveNewModifierCodeFixProvider.cs (1)
49CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\RemoveUnusedLocalFunction\CSharpRemoveUnusedLocalFunctionCodeFixProvider.cs (1)
34CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
55CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
53CodeAction.Create(
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
51CodeAction.Create(
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (25)
30public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext)
44private async Task<CodeAction?> GetFixAsync(
74private async Task<ImmutableArray<(Diagnostic diagnostic, CodeAction action)>> GetDiagnosticsAndCodeActionsAsync(
95return await ProducerConsumer<(Diagnostic diagnostic, CodeAction action)>.RunParallelAsync(
113Action<(Diagnostic diagnostic, CodeAction action)> onItemFound,
134private async Task<CodeAction?> GetFixAsync(
146var bag = new ConcurrentBag<(Diagnostic diagnostic, CodeAction action)>();
175private static Action<CodeAction, ImmutableArray<Diagnostic>> GetRegisterCodeFixAction(
177Action<(Diagnostic diagnostic, CodeAction action)> onItemFound)
181using var _ = ArrayBuilder<CodeAction>.GetInstance(out var stack);
201ConcurrentBag<(Diagnostic diagnostic, CodeAction action)> fixes,
207public virtual async Task<CodeAction?> TryGetMergedFixAsync(
208ImmutableArray<(Diagnostic diagnostic, CodeAction action)> batchOfFixes,
219return CodeAction.SolutionChangeAction.Create(title, _ => Task.FromResult(newSolution), title);
227ImmutableArray<(Diagnostic diagnostic, CodeAction action)> diagnosticsAndCodeActions,
248private static async Task<IReadOnlyDictionary<DocumentId, ConcurrentBag<(CodeAction, Document)>>> GetDocumentIdToChangedDocumentsAsync(
250ImmutableArray<(Diagnostic diagnostic, CodeAction action)> diagnosticsAndCodeActions,
254var documentIdToChangedDocuments = new ConcurrentDictionary<DocumentId, ConcurrentBag<(CodeAction, Document)>>();
272IReadOnlyDictionary<DocumentId, ConcurrentBag<(CodeAction, Document)>> documentIdToChangedDocuments,
273ImmutableArray<(Diagnostic diagnostic, CodeAction action)> diagnosticsAndCodeActions,
297Dictionary<CodeAction, int> codeActionToDiagnosticLocation,
299IEnumerable<(CodeAction action, Document document)> changedDocuments,
340private static readonly Func<DocumentId, ConcurrentBag<(CodeAction, Document)>> s_getValue =
345ConcurrentDictionary<DocumentId, ConcurrentBag<(CodeAction, Document)>> documentIdToChangedDocuments,
346CodeAction codeAction,
ConvertAnonymousType\AbstractConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (4)
57CodeAction.Create(
60CodeAction.Create(FeaturesResources.just_this_anonymous_type, c => FixInCurrentMemberAsync(document, anonymousNode, anonymousType, allAnonymousTypes: false, c), nameof(FeaturesResources.just_this_anonymous_type)),
61CodeAction.Create(FeaturesResources.all_anonymous_types_in_container, c => FixInCurrentMemberAsync(document, anonymousNode, anonymousType, allAnonymousTypes: true, c), nameof(FeaturesResources.all_anonymous_types_in_container)),
70CodeAction.Create(FeaturesResources.Convert_to_tuple, c => FixInCurrentMemberAsync(document, anonymousNode, anonymousType, allAnonymousTypes: false, c), nameof(FeaturesResources.Convert_to_tuple)),
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
50CodeAction.Create(
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
110CodeAction.Create(
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (1)
106CodeAction.Create(
ConvertToInterpolatedString\ConvertRegularStringToInterpolatedStringRefactoringProvider.cs (1)
75CodeAction.Create(
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDetectionCodeFixProvider.cs (1)
38CodeAction.Create(
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.cs (9)
79using var _1 = ArrayBuilder<CodeAction>.GetInstance(out var actions);
107Document priorDocument, CodeAction codeAction, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken)
126CodeAction action,
151Action<CodeAction, TextSpan> registerSingleAction,
152Action<ImmutableArray<CodeAction>> registerMultipleActions,
178private async Task<(CodeAction CodeAction, TextSpan ApplicableToSpan)?> HandleNonSelectionAsync(
253public async Task<ImmutableArray<CodeAction>> GenerateConstructorFromMembersAsync(
270private ImmutableArray<CodeAction> GetCodeActions(Document document, State state, bool addNullChecks)
272using var result = TemporaryArray<CodeAction>.Empty;
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (1)
54CodeAction.Create(
IntroduceVariable\AbstractIntroduceVariableService.cs (7)
62public async Task<CodeAction> IntroduceVariableAsync(
84return CodeAction.Create(title, actions, isInlinable: true);
92private (string title, ImmutableArray<CodeAction>) CreateActions(State state, CancellationToken cancellationToken)
94using var _ = ArrayBuilder<CodeAction>.GetInstance(out var actions);
100private string AddActionsAndGetTitle(State state, ArrayBuilder<CodeAction> actions, CancellationToken cancellationToken)
183private void CreateConstantFieldActions(State state, ArrayBuilder<CodeAction> actions, CancellationToken cancellationToken)
247private CodeAction CreateAction(State state, bool allOccurrences, bool isConstant, bool isLocal, bool isQueryLocal)
MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceCodeRefactoringProvider.cs (1)
45CodeAction.Create(
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (1)
144CodeAction.Create(
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (1)
68CodeAction.Create(
src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
46CodeAction.Create(
src\Analyzers\Core\CodeFixes\AddRequiredParentheses\AddRequiredParenthesesCodeFixProvider.cs (1)
34CodeAction.Create(
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
42CodeAction.Create(
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractRemoveDocCommentNodeCodeFixProvider.cs (1)
41CodeAction.Create(
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (1)
36CodeAction.Create(
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (9)
39public async Task<ImmutableArray<CodeAction>> GenerateVariableAsync(
54using var _ = ArrayBuilder<CodeAction>.GetInstance(out var actions);
82return [CodeAction.Create(
96ArrayBuilder<CodeAction> result, SemanticDocument document, State state, CancellationToken cancellationToken)
139private static void GenerateWritableProperty(ArrayBuilder<CodeAction> result, SemanticDocument document, State state)
146private static void AddFieldCodeActions(ArrayBuilder<CodeAction> result, SemanticDocument document, State state)
178private static void GenerateWriteableField(ArrayBuilder<CodeAction> result, SemanticDocument document, State state)
185ArrayBuilder<CodeAction> result, Document document, State state, CancellationToken cancellationToken)
201ArrayBuilder<CodeAction> result, Document document, State state, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
39CodeAction.Create(
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (1)
31CodeAction.Create(
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
55CodeAction.Create(
src\Analyzers\Core\CodeFixes\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsCodeFixProvider.cs (1)
29CodeAction.Create(
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
48CodeAction.Create(