2 instantiations of CodeCleanupOptions
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupOptionsProviders.cs (2)
19
=>
new
()
34
=>
new
()
28 references to CodeCleanupOptions
Microsoft.CodeAnalysis.Features (1)
Formatting\INewDocumentFormattingProvider.cs (1)
13
/// <inheritdoc cref="INewDocumentFormattingService.FormatNewDocumentAsync(Document, Document,
CodeCleanupOptions
, CancellationToken)"/>
Microsoft.CodeAnalysis.Workspaces (27)
CodeActions\CodeAction.cs (1)
481
var
options = await document.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false);
CodeActions\CodeAction_Cleanup.cs (8)
29
private static readonly ImmutableArray<Func<Document,
CodeCleanupOptions
, CancellationToken, Task<Document>>> s_cleanupPasses =
47
private static async Task<Document> CleanupSyntaxAsync(Document document,
CodeCleanupOptions
options, CancellationToken cancellationToken)
87
async Task<ImmutableArray<(DocumentId documentId,
CodeCleanupOptions
codeCleanupOptions)>> GetDocumentIdsAndOptionsToCleanAsync()
89
using var _ = ArrayBuilder<(DocumentId documentId,
CodeCleanupOptions
options)>.GetInstance(documentIds.Length, out var documentIdsAndOptions);
97
var
codeActionOptions = await document.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false);
106
internal static async ValueTask<Document> CleanupDocumentAsync(Document document,
CodeCleanupOptions
options, CancellationToken cancellationToken)
122
ImmutableArray<(DocumentId documentId,
CodeCleanupOptions
options)> documentIdsAndOptions,
136
Solution solution, Func<Document,
CodeCleanupOptions
, CancellationToken, Task<Document>> cleanupDocumentAsync)
CodeCleanup\AbstractCodeCleanerService.cs (2)
29
public async Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans,
CodeCleanupOptions
options, ImmutableArray<ICodeCleanupProvider> providers, CancellationToken cancellationToken)
457
CodeCleanupOptions
options,
CodeCleanup\CodeCleaner.cs (4)
50
public static async Task<Document> CleanupAsync(Document document,
CodeCleanupOptions
options, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default)
60
public static async Task<Document> CleanupAsync(Document document, SyntaxAnnotation annotation,
CodeCleanupOptions
options, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default)
70
public static Task<Document> CleanupAsync(Document document, TextSpan span,
CodeCleanupOptions
options, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default)
77
public static async Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans,
CodeCleanupOptions
options, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default)
CodeCleanup\ICodeCleanerService.cs (1)
30
Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans,
CodeCleanupOptions
options, ImmutableArray<ICodeCleanupProvider> providers, CancellationToken cancellationToken);
CodeCleanup\Providers\FormatCodeCleanupProvider.cs (1)
20
public async Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans,
CodeCleanupOptions
options, CancellationToken cancellationToken)
CodeCleanup\Providers\ICodeCleanupProvider.cs (1)
27
Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans,
CodeCleanupOptions
options, CancellationToken cancellationToken);
CodeCleanup\Providers\SimplificationCodeCleanupProvider.cs (1)
19
public Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans,
CodeCleanupOptions
options, CancellationToken cancellationToken)
ExtractMethod\ExtractMethodOptions.cs (4)
25
[DataMember] public required CodeCleanupOptions
CodeCleanupOptions
{ get; init; }
38
public AddImportPlacementOptions AddImportOptions =>
CodeCleanupOptions
.AddImportOptions;
39
public LineFormattingOptions LineFormattingOptions =>
CodeCleanupOptions
.FormattingOptions.LineFormatting;
40
public SimplifierOptions SimplifierOptions =>
CodeCleanupOptions
.SimplifierOptions;
Rename\ConflictEngine\RenamedSpansTracker.cs (1)
156
var
cleanupOptions = await document.GetCodeCleanupOptionsAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupOptionsProviders.cs (3)
18
public static
CodeCleanupOptions
GetCodeCleanupOptions(this IOptionsReader options, LanguageServices languageServices, bool? allowImportsInHiddenRegions = null)
27
public static async ValueTask<
CodeCleanupOptions
> GetCodeCleanupOptionsAsync(this Document document, CancellationToken cancellationToken)
33
public static
CodeCleanupOptions
GetDefault(LanguageServices languageServices)