1 instantiation of DocumentEditor
Microsoft.CodeAnalysis.Workspaces (1)
Editing\DocumentEditor.cs (1)
37return new DocumentEditor(document, model, root);
339 references to DocumentEditor
ILLink.CodeFixProvider (22)
BaseAttributeCodeFixProvider.cs (2)
72var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
DynamicallyAccessedMembersCodeFixProvider.cs (2)
133var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
RequiresUnsafeCodeFixProvider.cs (10)
138var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 190var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 369var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 392var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 418var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
SynchronizeUnsafeContractCodeFixProvider.cs (2)
181var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
UnsafeModifierCodeFixHelpers.cs (6)
107var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 124var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 184var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.Analyzers.Extra (6)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (4)
143var docEditor = await DocumentEditor.CreateAsync(targetDoc, cancellationToken).ConfigureAwait(false); 471var docEditor = await solEditor.GetDocumentEditorAsync(doc.Id, cancellationToken).ConfigureAwait(false); 581var docEditor = await solEditor.GetDocumentEditorAsync(targetDoc.Id, cancellationToken).ConfigureAwait(false);
MakeExeTypesInternalFixer.cs (2)
39var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.App.CodeFixes (4)
Kestrel\ListenOnIPv6AnyFixer.cs (2)
33var editor = await DocumentEditor.CreateAsync(context.Document, cancellationToken).ConfigureAwait(false);
PublicPartialProgramClassFixer.cs (2)
31var editor = await DocumentEditor.CreateAsync(context.Document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Analyzers (13)
FixAnalyzers\FixerWithFixAllAnalyzer.Fixer.cs (2)
59var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (6)
125var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 194var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 260var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
MetaAnalyzers\Fixers\PreferIsKindFix.cs (5)
39var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 50protected abstract void FixDiagnostic(DocumentEditor editor, SyntaxNode nodeToFix); 65var editor = await DocumentEditor.CreateAsync(document, fixAllContext.CancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\roslyn\src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (2)
302var mainDocumentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 314var partialDefinitionDocumentEditor = await solutionEditor.GetDocumentEditorAsync(partialDefinitionDocument.Id, cancellationToken).ConfigureAwait(false);
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
332var editor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Analyzers (1)
MetaAnalyzers\Fixers\CSharpPreferIsKindFix.cs (1)
37protected override void FixDiagnostic(DocumentEditor editor, SyntaxNode nodeToFix)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (13)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
97var documentEditor = await solutionEditor 490var documentEditor = await solutionEditor
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (6)
137var constructorDocumentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 383var documentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 476var declarationDocumentEditor = await solutionEditor.GetDocumentEditorAsync(declarationDocument.Id, cancellationToken).ConfigureAwait(false); 535var documentEditor = await solutionEditor.GetDocumentEditorAsync(memberDocument.Id, cancellationToken).ConfigureAwait(false); 610var documentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 626var documentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (2)
94var editor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 126var groupDocumentEditor = await solutionEditor.GetDocumentEditorAsync(groupDocument.Id, cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (3)
63var editor = await solutionEditor.GetDocumentEditorAsync(editingDocument.Id, cancellationToken).ConfigureAwait(false); 83var editor = await solutionEditor.GetDocumentEditorAsync(editingDocument.Id, cancellationToken).ConfigureAwait(false); 112var editor = await solutionEditor.GetDocumentEditorAsync(group.Key.Id, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Features (18)
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (3)
100var mainDocumentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 274var editor = await solutionEditor.GetDocumentEditorAsync(solution.GetDocumentId(initializer.SyntaxTree), cancellationToken).ConfigureAwait(false); 369var editor = await solutionEditor.GetDocumentEditorAsync(solution.GetDocumentId(syntaxTree), cancellationToken).ConfigureAwait(false);
Copilot\CSharpCopilotCodeFixProvider.cs (2)
123var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (1)
251var editor = await solutionEditor.GetDocumentEditorAsync(
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (1)
68var editor = await solutionEditor.GetDocumentEditorAsync(
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider_Update.cs (1)
107var editor = await solutionEditor.GetDocumentEditorAsync(editingDocument.Id, cancellationToken).ConfigureAwait(false);
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
97var documentEditor = await solutionEditor 490var documentEditor = await solutionEditor
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (6)
137var constructorDocumentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 383var documentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 476var declarationDocumentEditor = await solutionEditor.GetDocumentEditorAsync(declarationDocument.Id, cancellationToken).ConfigureAwait(false); 535var documentEditor = await solutionEditor.GetDocumentEditorAsync(memberDocument.Id, cancellationToken).ConfigureAwait(false); 610var documentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 626var documentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (2)
94var editor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 126var groupDocumentEditor = await solutionEditor.GetDocumentEditorAsync(groupDocument.Id, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (27)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\CSharpStaticHolderTypes.Fixer.cs (2)
51DocumentEditor editor = await DocumentEditor.CreateAsync(document, ct).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\CSharpDoNotInitializeUnnecessarily.Fixer.cs (2)
43DocumentEditor editor = await DocumentEditor.CreateAsync(doc, ct).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\InteropServices\CSharpDisableRuntimeMarshalling.FixAllProvider.cs (2)
34var editor = await DocumentEditor.CreateAsync(document, fixAllContext.CancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\InteropServices\CSharpDisableRuntimeMarshalling.Fixer.cs (4)
76var editor = await DocumentEditor.CreateAsync(document, ct).ConfigureAwait(false); 88private static bool TryRewriteMethodCall(SyntaxNode node, DocumentEditor editor, IdentifierGenerator pointerIdentifierGenerator, bool addRenameAnnotation, CancellationToken ct) 201private static void AddUnsafeModifierToEnclosingMethod(DocumentEditor editor, SyntaxNode syntax)
Microsoft.NetCore.Analyzers\InteropServices\CSharpDynamicInterfaceCastableImplementation.Fixer.cs (2)
184var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Performance\CSharpPreferDictionaryTryMethodsOverContainsKeyGuardFixer.cs (4)
125var editor = await DocumentEditor.CreateAsync(document, ct).ConfigureAwait(false); 218var editor = await DocumentEditor.CreateAsync(document, ct).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Performance\CSharpUseStringMethodCharOverloadWithSingleCharacters.Fixer.cs (1)
71DocumentEditor editor,
Microsoft.NetCore.Analyzers\Runtime\CSharpAvoidRedundantRegexIsMatchBeforeMatch.Fixer.cs (4)
440var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 460var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\CSharpPreferDictionaryContainsMethods.Fixer.cs (2)
52var editor = await DocumentEditor.CreateAsync(doc, ct).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Usage\CSharpDoNotPassNonNullableValueToArgumentNullExceptionThrowIfNullFixer.cs (2)
20var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Usage\CSharpPreferGenericOverloads.Fixer.cs (2)
43var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (3)
63var editor = await solutionEditor.GetDocumentEditorAsync(editingDocument.Id, cancellationToken).ConfigureAwait(false); 83var editor = await solutionEditor.GetDocumentEditorAsync(editingDocument.Id, cancellationToken).ConfigureAwait(false); 112var editor = await solutionEditor.GetDocumentEditorAsync(group.Key.Id, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features (32)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs (2)
117var editor = await solutionEditor.GetDocumentEditorAsync(documentToUpdate.Id, cancellationToken).ConfigureAwait(false); 144var memberEditor = await solutionEditor.GetDocumentEditorAsync(memberDocument.Id, cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Attribute.cs (2)
70var editor = await DocumentEditor.CreateAsync(documentWithAttribute, cancellationToken).ConfigureAwait(false);
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeEditor.cs (6)
120var documentEditor = await DocumentEditor.CreateAsync(document, CancellationToken).ConfigureAwait(false); 184private void RemoveLeadingBlankLinesFromMovedType(DocumentEditor documentEditor) 232var documentEditor = await DocumentEditor.CreateAsync(sourceDocument, CancellationToken).ConfigureAwait(false); 300DocumentEditor documentEditor,
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeNamespaceScopeEditor.cs (2)
46var editor = await DocumentEditor.CreateAsync(SemanticDocument.Document, this.CancellationToken).ConfigureAwait(false);
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (5)
317var documentEditor = await solutionEditor.GetDocumentEditorAsync(id, cancellationToken).ConfigureAwait(false); 443var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 737var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (2)
277var calleeDocumentEditor = await solutionEditor.GetDocumentEditorAsync(calleeDocumentId, cancellationToken).ConfigureAwait(false); 285var callerDocumentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (2)
286var docEditor = await DocumentEditor.CreateAsync(doc, cancellationToken).ConfigureAwait(false);
PullMemberUp\MembersPuller.cs (6)
104var destinationEditor = await solutionEditor.GetDocumentEditorAsync( 123var originalMemberEditor = await solutionEditor.GetDocumentEditorAsync( 197DocumentEditor editor, 225DocumentEditor editor, 278var destinationEditor = await solutionEditor.GetDocumentEditorAsync( 330var originalMemberEditor = await solutionEditor.GetDocumentEditorAsync(
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (2)
63var documentEditor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
src\roslyn\src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (2)
302var mainDocumentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 314var partialDefinitionDocumentEditor = await solutionEditor.GetDocumentEditorAsync(partialDefinitionDocument.Id, cancellationToken).ConfigureAwait(false);
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
332var editor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.NetAnalyzers (140)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DefineAccessorsForAttributeArguments.Fixer.cs (4)
125DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 152DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotDirectlyAwaitATask.Fixer.cs (5)
55DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 60private static void FixDiagnostic(DocumentEditor editor, SyntaxNode expression, bool argument) 88var editor = await DocumentEditor.CreateAsync(document, fixAllContext.CancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EnumStorageShouldBeInt32.Fixer.cs (2)
48var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EnumWithFlagsAttribute.Fixer.cs (2)
52DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EquatableAnalyzer.Fixer.cs (4)
95var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 119var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\ExceptionsShouldBePublic.Fixer.cs (2)
49DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\ImplementStandardExceptionConstructors.Fixer.cs (2)
57DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\MarkAttributesWithAttributeUsage.Fixer.cs (2)
67var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OperatorsShouldHaveSymmetricalOverloads.Fixer.cs (2)
51var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OverloadOperatorEqualsOnOverridingValueTypeEquals.Fixer.cs (2)
52var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OverrideEqualsAndOperatorEqualsOnValueTypes.Fixer.cs (2)
64var editor = await DocumentEditor.CreateAsync(document, ct).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OverrideEqualsOnOverloadingOperatorEquals.Fixer.cs (2)
57var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OverrideGetHashCodeOnOverridingEquals.Fixer.cs (2)
49var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OverrideMethodsOnComparableTypes.Fixer.cs (2)
52var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\TypesThatOwnDisposableFieldsShouldBeDisposable.Fixer.cs (2)
48DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UriParametersShouldNotBeStrings.Fixer.cs (2)
78var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidLengthCalculationWhenSlicingToEnd.Fixer.cs (2)
70var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidUnusedPrivateFields.Fixer.cs (2)
53DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\Maintainability\UseNameofInPlaceOfString.Fixer.cs (2)
54var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\RemoveEmptyFinalizers.Fixer.cs (2)
44DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\UseLiteralsWhereAppropriate.Fixer.cs (2)
57var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\InteropServices\ProvidePublicParameterlessSafeHandleConstructor.Fixer.cs (2)
52var editor = await DocumentEditor.CreateAsync(document, ct).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\InteropServices\SpecifyMarshalingForPInvokeStringArguments.Fixer.cs (2)
70DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Performance\DoNotUseCountWhenAnyCanBeUsed.Fixer.cs (2)
127var editor = await DocumentEditor.CreateAsync(this._document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Performance\PreferConvertToHexStringOverBitConverter.Fixer.cs (2)
87var editor = await DocumentEditor.CreateAsync(context.Document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Performance\PreferIsEmptyOverCount.Fixer.cs (2)
49DocumentEditor editor = await DocumentEditor.CreateAsync(context.Document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Performance\PreferReadOnlySpanOverSpan.Fixer.cs (2)
57var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Performance\UseAsSpanInsteadOfRangeIndexer.Fixer.cs (2)
108var editor = await DocumentEditor.CreateAsync(_document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Performance\UsePropertyInsteadOfCountMethodWhenAvailable.Fixer.cs (2)
116var editor = await DocumentEditor.CreateAsync(this._document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Performance\UseSearchValues.Fixer.cs (3)
67DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 168private static void ImportSystemNamespaceIfNeeded(DocumentEditor editor, INamedTypeSymbol memoryExtensions, SyntaxNode node)
Microsoft.NetCore.Analyzers\Performance\UseSpanClearInsteadOfFIll.Fixer.cs (2)
44DocumentEditor editor = await DocumentEditor.CreateAsync(context.Document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Performance\UseStringContainsCharOverloadWithSingleCharacters.Fixer.cs (2)
70var editor = await DocumentEditor.CreateAsync(_document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Performance\UseStringMethodCharOverloadWithSingleCharacters.Fixer.cs (3)
59protected abstract void ApplyFix(DocumentEditor editor, SemanticModel model, SyntaxNode oldArgumentListNode, char c); 72var editor = await DocumentEditor.CreateAsync(_document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\AvoidConstArrays.Fixer.cs (2)
53DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\AvoidUnreliableStreamRead.Fixer.cs (2)
85var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\AvoidUnsealedAttributes.Fixer.cs (3)
25DocumentEditor editor = await DocumentEditor.CreateAsync(context.Document, context.CancellationToken).ConfigureAwait(false); 40private static Task<Document> MakeSealedAsync(DocumentEditor editor, SyntaxNode declaration)
Microsoft.NetCore.Analyzers\Runtime\AvoidZeroLengthArrayAllocations.Fixer.cs (2)
49DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\InstantiateArgumentExceptionsCorrectly.Fixer.cs (4)
82DocumentEditor editor = await DocumentEditor.CreateAsync(document, token).ConfigureAwait(false); 120DocumentEditor editor = await DocumentEditor.CreateAsync(document, token).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\MarkAllNonSerializableFields.Fixer.cs (2)
57DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\MarkISerializableTypesWithSerializable.Fixer.cs (2)
45DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\PreferAsSpanOverSubstring.Fixer.cs (2)
60var editor = await DocumentEditor.CreateAsync(document, token).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\PreferConstCharOverConstUnitString.Fixer.cs (4)
106DocumentEditor editor = await DocumentEditor.CreateAsync(doc, cancellationToken).ConfigureAwait(false); 119DocumentEditor editor = await DocumentEditor.CreateAsync(doc, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\PreferJsonElementParse.Fixer.cs (2)
50DocumentEditor editor = await DocumentEditor.CreateAsync(doc, ct).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\PreferStringContainsOverIndexOf.Fixer.cs (2)
78DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\PreferTypedStringBuilderAppendOverloads.Fixer.cs (4)
46DocumentEditor editor = await DocumentEditor.CreateAsync(doc, ct).ConfigureAwait(false); 65DocumentEditor editor = await DocumentEditor.CreateAsync(doc, ct).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\SealInternalTypes.Fixer.cs (1)
49var documentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, token).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\TestForEmptyStringsUsingStringLength.Fixer.cs (4)
109DocumentEditor editor = await DocumentEditor.CreateAsync(context.Document, context.CancellationToken).ConfigureAwait(false); 125DocumentEditor editor = await DocumentEditor.CreateAsync(context.Document, context.CancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\TestForNaNCorrectly.Fixer.cs (2)
88DocumentEditor editor = await DocumentEditor.CreateAsync(context.Document, context.CancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\UseCancellationTokenThrowIfCancellationRequested.Fixer.cs (5)
60var editor = await DocumentEditor.CreateAsync(context.Document, token).ConfigureAwait(false); 87var editor = await DocumentEditor.CreateAsync(context.Document, token).ConfigureAwait(false); 120DocumentEditor editor,
Microsoft.NetCore.Analyzers\Runtime\UseEnvironmentMembersFixer.cs (2)
62DocumentEditor editor = await DocumentEditor.CreateAsync(doc, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\UseExceptionThrowHelpersFixer.cs (4)
41DocumentEditor editor = await DocumentEditor.CreateAsync(doc, cancellationToken).ConfigureAwait(false); 134DocumentEditor editor = await DocumentEditor.CreateAsync(document, fixAllContext.CancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\UseRegexMembersFixer.cs (2)
66DocumentEditor editor = await DocumentEditor.CreateAsync(doc, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\UseSpanBasedStringConcat.Fixer.cs (2)
88var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Runtime\UseStringEqualsOverStringCompare.Fixer.cs (2)
57var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Tasks\DoNotCreateTaskCompletionSourceWithWrongArguments.Fixer.cs (2)
45DocumentEditor editor = await DocumentEditor.CreateAsync(doc, ct).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Tasks\DoNotUseWhenAllOrWaitAllWithSingleArgumentFixer.cs (4)
45var editor = await DocumentEditor.CreateAsync(context.Document, ct).ConfigureAwait(false); 65var editor = await DocumentEditor.CreateAsync(context.Document, ct).ConfigureAwait(false);
Microsoft.NetCore.Analyzers\Usage\UseVolatileReadWrite.Fixer.cs (2)
67var editor = await DocumentEditor.CreateAsync(context.Document, cancellationToken).ConfigureAwait(false);
SyntaxEditorFixAllProvider.cs (2)
36/// <see cref="DocumentEditor"/>, because <see cref="DocumentEditor.CreateAsync"/> binds a
Microsoft.CodeAnalysis.VisualBasic.Analyzers (1)
MetaAnalyzers\Fixers\BasicPreferIsKindFix.vb (1)
34Protected Overrides Sub FixDiagnostic(editor As DocumentEditor, nodeToFix As SyntaxNode)
Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers (8)
Microsoft.NetCore.Analyzers\InteropServices\BasicSpecifyMarshalingForPInvokeStringArguments.Fixer.vb (1)
34Dim editor = Await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(False)
Microsoft.NetCore.Analyzers\Performance\BasicPreferDictionaryTryMethodsOverContainsKeyGuardFixer.vb (2)
114Dim editor = Await DocumentEditor.CreateAsync(document, ct).ConfigureAwait(False) 187Dim editor = Await DocumentEditor.CreateAsync(document, ct).ConfigureAwait(False)
Microsoft.NetCore.Analyzers\Performance\BasicUseStringMethodCharOverloadWithSingleCharacters.Fixer.vb (1)
66Protected Overrides Sub ApplyFix(editor As DocumentEditor, model As SemanticModel, oldArgumentListNode As SyntaxNode, c As Char)
Microsoft.NetCore.Analyzers\Runtime\BasicPreferDictionaryContainsMethods.Fixer.vb (2)
38Dim editor = Await DocumentEditor.CreateAsync(doc, ct).ConfigureAwait(False) 53Dim editor = Await DocumentEditor.CreateAsync(doc, ct).ConfigureAwait(False)
Microsoft.NetCore.Analyzers\Usage\BasicDoNotPassNonNullableValueToArgumentNullExceptionThrowIfNullFixer.vb (1)
16Dim editor = Await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(False)
Microsoft.NetCore.Analyzers\Usage\BasicPreferGenericOverloads.Fixer.vb (1)
43Dim editor = Await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(False)
Microsoft.CodeAnalysis.Workspaces (15)
Editing\DocumentEditor.cs (2)
26/// Creates a new <see cref="DocumentEditor"/> instance. 28public static async Task<DocumentEditor> CreateAsync(Document document, CancellationToken cancellationToken = default)
Editing\SolutionEditor.cs (6)
18private readonly Dictionary<DocumentId, DocumentEditor> _documentEditors = []; 26/// Gets the <see cref="DocumentEditor"/> for the corresponding <see cref="DocumentId"/>. 28public async Task<DocumentEditor> GetDocumentEditorAsync(DocumentId id, CancellationToken cancellationToken = default) 30if (!_documentEditors.TryGetValue(id, out var editor)) 32editor = await DocumentEditor.CreateAsync(solution.GetDocument(id), cancellationToken).ConfigureAwait(false); 46foreach (var docEd in _documentEditors.Values)
Editing\SymbolEditor.cs (7)
212/// <param name="editor">The <see cref="DocumentEditor"/> to apply edits to.</param> 214public delegate void DeclarationEditAction(DocumentEditor editor, SyntaxNode declaration); 219/// <param name="editor">The <see cref="DocumentEditor"/> to apply edits to.</param> 222public delegate Task AsyncDeclarationEditAction(DocumentEditor editor, SyntaxNode declaration, CancellationToken cancellationToken); 285var editor = await DocumentEditor.CreateAsync(doc, cancellationToken).ConfigureAwait(false); 465var editor = await solutionEditor.GetDocumentEditorAsync(docId, cancellationToken).ConfigureAwait(false);
Microsoft.Interop.ComInterfaceGenerator (7)
Analyzers\AddGeneratedComClassFixer.cs (2)
27var editor = await solutionEditor.GetDocumentEditorAsync(documentId, ct).ConfigureAwait(false); 63var attrEditor = await solutionEditor.GetDocumentEditorAsync(attrDocumentId, ct).ConfigureAwait(false);
Analyzers\AddMarshalAsToElementFixer.cs (2)
47DocumentEditor editor = await DocumentEditor.CreateAsync(doc, ct).ConfigureAwait(false);
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (2)
42var editor = await solutionEditor.GetDocumentEditorAsync(documentId, ct).ConfigureAwait(false); 76private static async Task ConvertComImportToGeneratedComInterfaceAsync(DocumentEditor editor, SyntaxNode node, bool mayRequireAdditionalWork, bool addStringMarshalling, CancellationToken ct)
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
228protected static void MakeNodeParentsPartial(DocumentEditor editor, SyntaxNode syntax)
Microsoft.Interop.LibraryImportGenerator (15)
Analyzers\AddDisableRuntimeMarshallingAttributeFixer.cs (2)
58DocumentEditor editor = await DocumentEditor.CreateAsync(assemblyInfo, cancellationToken).ConfigureAwait(false);
Analyzers\ConvertToLibraryImportFixer.cs (9)
88var editor = await solutionEditor.GetDocumentEditorAsync(documentId, ct).ConfigureAwait(false); 110var editor = await solutionEditor.GetDocumentEditorAsync(documentId, ct).ConfigureAwait(false); 125var editor = await solutionEditor.GetDocumentEditorAsync(documentId, ct).ConfigureAwait(false); 144var editor = await solutionEditor.GetDocumentEditorAsync(documentId, ct).ConfigureAwait(false); 173DocumentEditor editor, 210DocumentEditor editor, 292private static async Task<bool> TransformCallersOfNoPreserveSigMethod(DocumentEditor editor, IMethodSymbol methodSymbol, CancellationToken cancellationToken) 433DocumentEditor editor, 592DocumentEditor editor,
Analyzers\CustomMarshallerAttributeFixer.cs (3)
187DocumentEditor editor, 204private static void AddMissingMembersToStatelessMarshaller(DocumentEditor editor, SyntaxNode declaringSyntax, INamedTypeSymbol marshallerType, ITypeSymbol managedType, HashSet<string> missingMemberNames, bool isLinearCollectionMarshaller) 400private static void AddMissingMembersToStatefulMarshaller(DocumentEditor editor, SyntaxNode declaringSyntax, INamedTypeSymbol marshallerType, ITypeSymbol managedType, HashSet<string> missingMemberNames, bool isLinearCollectionMarshaller)
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
228protected static void MakeNodeParentsPartial(DocumentEditor editor, SyntaxNode syntax)
Roslyn.Diagnostics.CSharp.Analyzers (5)
NumberCommentsRefactoring.cs (2)
61var editor = await DocumentEditor.CreateAsync(document, c).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (3)
63var editor = await solutionEditor.GetDocumentEditorAsync(editingDocument.Id, cancellationToken).ConfigureAwait(false); 83var editor = await solutionEditor.GetDocumentEditorAsync(editingDocument.Id, cancellationToken).ConfigureAwait(false); 112var editor = await solutionEditor.GetDocumentEditorAsync(group.Key.Id, cancellationToken).ConfigureAwait(false);
System.Text.RegularExpressions.Generator (6)
UpgradeToGeneratedRegexCodeFixer.cs (6)
148DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 212DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 262DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);