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