2 instantiations of CodeCleanupOptions
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupOptionsProviders.cs (2)
19=> new() 34=> new()
83 references to CodeCleanupOptions
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
211var cleanupOptions = await documentWithNameAndAnnotationsAdded.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Features (8)
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (3)
49var cleanupOptions = await document.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false); 61private static async Task<Document> ConvertFileScopedNamespaceAsync(Document document, CodeCleanupOptions cleanupOptions, CancellationToken cancellationToken) 70Document document, SyntaxNode root, BaseNamespaceDeclarationSyntax namespaceDeclaration, CodeCleanupOptions options, CancellationToken cancellationToken)
Formatting\CSharpAccessibilityModifiersNewDocumentFormattingProvider.cs (1)
30public async Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken)
Formatting\CSharpNamespaceDeclarationNewDocumentFormattingProvider.cs (1)
31public async Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken)
Formatting\CSharpOrganizeUsingsNewDocumentFormattingProvider.cs (1)
27public async Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken)
Formatting\CSharpUseProgramMainNewDocumentFormattingProvider.cs (1)
25public async Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken)
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
31CodeCleanupOptions options,
Microsoft.CodeAnalysis.EditorFeatures (2)
Options\TextBufferOptionProviders.cs (2)
75public static CodeCleanupOptions GetCodeCleanupOptions(this ITextBuffer textBuffer, EditorOptionsService optionsProvider, StructuredAnalyzerConfigOptions fallbackOptions, LanguageServices languageServices, bool explicitFormat, bool allowImportsInHiddenRegions) 80var options = configOptions.GetCodeCleanupOptions(languageServices, allowImportsInHiddenRegions);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Formatting\AbstractNewDocumentFormattingServiceTests.cs (1)
33var cleanupOptions =
Microsoft.CodeAnalysis.ExternalAccess.AspNetCore (1)
AddPackage\AspNetCoreAddPackageCodeAction.cs (1)
66var codeCleanupOptions = await document.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features (35)
AddFileBanner\AbstractAddFileBannerNewDocumentFormattingProvider.cs (1)
22public async Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken)
AddImport\AddImportOptions.cs (1)
18[property: DataMember(Order = 1)] CodeCleanupOptions CleanupOptions,
AddImport\References\AssemblyReference.cs (1)
27Document document, SyntaxNode node, CodeCleanupOptions options, CancellationToken cancellationToken)
AddImport\References\MetadataSymbolReference.cs (1)
37Document document, CodeCleanupOptions options, SyntaxNode node,
AddImport\References\PackageReference.cs (1)
29Document document, SyntaxNode node, CodeCleanupOptions options, CancellationToken cancellationToken)
AddImport\References\ProjectSymbolReference.cs (1)
83Document document, CodeCleanupOptions options, SyntaxNode node,
AddImport\References\Reference.cs (2)
101Document document, SyntaxNode node, CodeCleanupOptions options, CancellationToken cancellationToken); 104Document document, SyntaxNode node, CodeCleanupOptions options, CancellationToken cancellationToken)
AddImport\References\SymbolReference.cs (3)
50CodeCleanupOptions options, bool hasExistingImport, 77CodeCleanupOptions options, CancellationToken cancellationToken) 125Document document, CodeCleanupOptions options, SyntaxNode node,
ChangeSignature\AbstractChangeSignatureService.cs (1)
424var cleanupOptions = await updatedDoc.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (1)
134var cleanupOptions = await suppressionsDoc.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (3)
605var documentOptions = await document.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false); 691var documentOptions = await document.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false); 709Document document, CodeCleanupOptions documentOptions, CancellationToken cancellationToken)
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (2)
112var memberContainingDocumentCleanupOptions = await document.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false); 172Document memberContainingDocument, CodeCleanupOptions cleanupOptions, CancellationToken cancellationToken)
ExtractInterface\AbstractExtractInterfaceService.cs (1)
287var cleanupOptions = await document.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false);
Formatting\AbstractNewDocumentFormattingService.cs (1)
35public async Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken)
Formatting\INewDocumentFormattingProvider.cs (2)
13/// <inheritdoc cref="INewDocumentFormattingService.FormatNewDocumentAsync(Document, Document, CodeCleanupOptions, CancellationToken)"/> 14Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken);
Formatting\INewDocumentFormattingService.cs (1)
20Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken);
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
316var cleanupOptions = await codeGenResult.GetCodeCleanupOptionsAsync(_cancellationToken).ConfigureAwait(false);
IntroduceVariable\AbstractIntroduceVariableService.cs (2)
53protected abstract Document IntroduceLocal(SemanticDocument document, CodeCleanupOptions options, TExpressionSyntax expression, bool allOccurrences, bool isConstant, CancellationToken cancellationToken); 65CodeCleanupOptions options,
IntroduceVariable\AbstractIntroduceVariableService.IntroduceVariableCodeAction.cs (2)
27public readonly CodeCleanupOptions Options; 32CodeCleanupOptions options,
IntroduceVariable\AbstractIntroduceVariableService.State.cs (3)
23private sealed partial class State(TService service, SemanticDocument document, CodeCleanupOptions options) 26public CodeCleanupOptions Options { get; } = options; 47CodeCleanupOptions options,
IntroduceVariable\IIntroduceVariableService.cs (1)
16Task<CodeAction> IntroduceVariableAsync(Document document, TextSpan textSpan, CodeCleanupOptions options, CancellationToken cancellationToken);
IntroduceVariable\IntroduceVariableCodeRefactoringProvider.cs (1)
30var cleanupOptions = await document.GetCodeCleanupOptionsAsync(context.CancellationToken).ConfigureAwait(false);
Shared\Utilities\ExtractTypeHelpers.cs (1)
91var newCleanupOptions = await newTypeDocument.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
436var codeCleanupOptions = await document.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
ExternalAccess\Razor\FormatNewFileHandler.cs (1)
75var cleanupOptions = await document.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\ConvertTupleToStructCodeRefactoringProvider\RemoteConvertTupleToStructCodeRefactoringService.cs (1)
84var options = await document.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces (30)
CodeActions\CodeAction.cs (1)
469var options = await document.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false);
CodeActions\CodeAction_Cleanup.cs (12)
44private static readonly Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>> s_cleanupSyntaxPass = 47private static readonly ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> s_cleanupSyntaxPasses = [s_cleanupSyntaxPass]; 53private static readonly ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> s_allCleanupPasses = 71internal static Task<Document> CleanupSyntaxAsync(Document document, CodeCleanupOptions options, CancellationToken cancellationToken) 114ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> passes, 126async Task<ImmutableArray<(DocumentId documentId, CodeCleanupOptions codeCleanupOptions)>> GetDocumentIdsAndOptionsToCleanAsync() 128using var _ = ArrayBuilder<(DocumentId documentId, CodeCleanupOptions options)>.GetInstance(documentIds.Length, out var documentIdsAndOptions); 139var codeActionOptions = await document.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false); 148internal static async ValueTask<Document> CleanupDocumentAsync(Document document, CodeCleanupOptions options, CancellationToken cancellationToken) 165ImmutableArray<(DocumentId documentId, CodeCleanupOptions options)> documentIdsAndOptions, 167ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> passes, 180Solution solution, Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>> cleanupDocumentAsync)
CodeCleanup\AbstractCodeCleanerService.cs (2)
29public async Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans, CodeCleanupOptions options, ImmutableArray<ICodeCleanupProvider> providers, CancellationToken cancellationToken) 457CodeCleanupOptions options,
CodeCleanup\CodeCleaner.cs (4)
50public static async Task<Document> CleanupAsync(Document document, CodeCleanupOptions options, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default) 60public static async Task<Document> CleanupAsync(Document document, SyntaxAnnotation annotation, CodeCleanupOptions options, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default) 70public static Task<Document> CleanupAsync(Document document, TextSpan span, CodeCleanupOptions options, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default) 77public static async Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans, CodeCleanupOptions options, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default)
CodeCleanup\ICodeCleanerService.cs (1)
30Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans, CodeCleanupOptions options, ImmutableArray<ICodeCleanupProvider> providers, CancellationToken cancellationToken);
CodeCleanup\Providers\FormatCodeCleanupProvider.cs (1)
20public async Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans, CodeCleanupOptions options, CancellationToken cancellationToken)
CodeCleanup\Providers\ICodeCleanupProvider.cs (1)
27Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans, CodeCleanupOptions options, CancellationToken cancellationToken);
CodeCleanup\Providers\SimplificationCodeCleanupProvider.cs (1)
19public Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans, CodeCleanupOptions options, CancellationToken cancellationToken)
ExtractMethod\ExtractMethodOptions.cs (1)
24[DataMember] public required CodeCleanupOptions CodeCleanupOptions { get; init; }
Rename\ConflictEngine\RenamedSpansTracker.cs (1)
164var cleanupOptions = await document.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (1)
15Document document, CodeCleanupOptions options, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupOptionsProviders.cs (3)
18public static CodeCleanupOptions GetCodeCleanupOptions(this IOptionsReader options, LanguageServices languageServices, bool? allowImportsInHiddenRegions = null) 27public static async ValueTask<CodeCleanupOptions> GetCodeCleanupOptionsAsync(this Document document, CancellationToken cancellationToken) 33public static CodeCleanupOptions GetDefault(LanguageServices languageServices)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CleanCodeGenerationOptions.cs (1)
20public required CodeCleanupOptions CleanupOptions { get; init; }
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
VBOptionsFactory.cs (1)
17public static ExtractMethodGenerationOptions CreateExtractMethodGenerationOptions(CodeGenerationOptions codeGenerationOptions, CodeCleanupOptions codeCleanupOptions)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
CodeCleanup\MockCodeCleanupProvider.cs (1)
27public Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans, CodeCleanupOptions options, CancellationToken cancellationToken)
Microsoft.VisualStudio.LanguageServices (1)
Implementation\AbstractEditorFactory.cs (1)
335var cleanupOptions = await addedDocument.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(true);