1 write to CancellationToken
Microsoft.CodeAnalysis.Workspaces (1)
CodeFixes\CodeFixContext.cs (1)
129
CancellationToken
= cancellationToken;
181 references to CancellationToken
ILLink.CodeFixProvider (2)
BaseAttributeCodeFixProvider.cs (1)
39
if (await document.GetSyntaxRootAsync (context.
CancellationToken
).ConfigureAwait (false) is not { } root)
DynamicallyAccessedMembersCodeFixProvider.cs (1)
99
if (await document.GetSyntaxRootAsync (context.
CancellationToken
).ConfigureAwait (false) is not { } root)
Microsoft.Analyzers.Extra (3)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (1)
58
var (invocationExpression, details) = await CheckIfCanFixAsync(context.Document, context.Span, context.
CancellationToken
).ConfigureAwait(false);
MakeExeTypesInternalFixer.cs (2)
28
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
32
var action = CodeAction.Create(Resources.MakeTypeInternal, c => MakeInternalAsync(context.Document, node, context.
CancellationToken
), nameof(MakeExeTypesInternalFixer));
Microsoft.AspNetCore.App.CodeFixes (10)
Authorization\AddAuthorizationBuilderFixer.cs (2)
29
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
35
var semanticModel = await context.Document.GetSemanticModelAsync(context.
CancellationToken
).ConfigureAwait(false);
Dependencies\AddPackageFixer.cs (3)
31
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
37
var semanticModel = await context.Document.GetSemanticModelAsync(context.
CancellationToken
).ConfigureAwait(false);
93
context.
CancellationToken
);
Http\HeaderDictionaryAddFixer.cs (2)
30
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
36
var semanticModel = await context.Document.GetSemanticModelAsync(context.
CancellationToken
).ConfigureAwait(false);
RouteParameterUnusedParameterFixer.cs (2)
31
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
37
var semanticModel = await context.Document.GetSemanticModelAsync(context.
CancellationToken
).ConfigureAwait(false);
WebApplicationBuilderFixer.cs (1)
31
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
Microsoft.AspNetCore.Components.Analyzers (1)
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
33
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
33
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
Microsoft.CodeAnalysis.CodeStyle.Fixes (34)
src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
36
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (2)
69
var cancellationToken = context.
CancellationToken
;
72
var root = await document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
35
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
63
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
32
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (1)
70
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\ConvertToAsync\AbstractConvertToAsyncCodeFixProvider.cs (2)
32
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
41
node, context.Document, diagnostic, context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
32
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractRemoveDocCommentNodeCodeFixProvider.cs (1)
36
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorCodeFixProvider.cs (1)
22
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (2)
43
var root = await document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
47
var codeActions = await GetCodeActionsAsync(context.Document, name, context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\AbstractImplementAbstractClassCodeFixProvider.cs (1)
26
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceCodeFixProvider.cs (1)
34
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\Iterator\AbstractIteratorCodeFixProvider.cs (2)
28
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
36
var codeAction = await GetCodeFixAsync(root, node, context.Document, diagnostic, context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeMemberStatic\AbstractMakeMemberStaticCodeFixProvider.cs (1)
24
TryGetMemberDeclaration(context.Diagnostics[0].Location.FindNode(context.
CancellationToken
), out _))
src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (1)
37
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
31
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\MakeTypeAbstract\AbstractMakeTypeAbstractCodeFixProvider.cs (1)
24
if (IsValidRefactoringContext(context.Diagnostics[0].Location?.FindNode(context.
CancellationToken
), out _))
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (3)
57
var root = await document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
73
var model = await document.GetRequiredSemanticModelAsync(context.
CancellationToken
).ConfigureAwait(false);
74
var symbol = model.GetDeclaredSymbol(node, context.
CancellationToken
);
src\Analyzers\Core\CodeFixes\OrderModifiers\AbstractOrderModifiersCodeFixProvider.cs (2)
43
var syntaxTree = await context.Document.GetRequiredSyntaxTreeAsync(context.
CancellationToken
).ConfigureAwait(false);
44
var syntaxNode = Location.Create(syntaxTree, context.Span).FindNode(context.
CancellationToken
);
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
32
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\RemoveUnnecessarySuppressions\RemoveUnnecessaryAttributeSuppressionsCodeFixProvider.cs (1)
29
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnnecessarySuppressions\RemoveUnnecessaryPragmaSuppressionsCodeFixProvider.cs (1)
34
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (2)
154
if (IsForEachIterationVariableDiagnostic(diagnostic, context.Document, context.
CancellationToken
))
164
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
32
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\UpdateLegacySuppressions\UpdateLegacySuppressionsCodeFixProvider.cs (1)
30
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (27)
src\Analyzers\CSharp\CodeFixes\AddInheritdoc\AddInheritdocCodeFixProvider.cs (1)
39
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
31
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\ConditionalExpressionInStringInterpolation\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (1)
37
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
40
var switchStatement = (SwitchStatementSyntax)switchLocation.FindNode(getInnermostNodeForTie: true, context.
CancellationToken
);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\CSharpConvertToRecordCodeFixProvider.cs (1)
33
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\DisambiguateSameVariable\CSharpDisambiguateSameVariableCodeFixProvider.cs (1)
41
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
65
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
40
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
50
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.cs (1)
30
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\PassInCapturedVariablesAsArgumentsCodeFixProvider.cs (1)
49
context.
CancellationToken
);
src\Analyzers\CSharp\CodeFixes\MakeMemberRequired\CSharpMakeMemberRequiredCodeFixProvider.cs (1)
36
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (1)
38
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\MakeStatementAsynchronous\CSharpMakeStatementAsynchronousCodeFixProvider.cs (1)
35
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
58
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
45
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
38
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\RemoveInKeyword\RemoveInKeywordCodeFixProvider.cs (1)
35
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\RemoveNewModifier\RemoveNewModifierCodeFixProvider.cs (1)
33
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (3)
40
var syntaxRoot = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
47
var semanticModel = await context.Document.GetRequiredSemanticModelAsync(context.
CancellationToken
).ConfigureAwait(false);
50
context.Document, semanticModel, defaultLiteral, context.
CancellationToken
);
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
83
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (1)
96
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
37
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
58
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
42
var cancellationToken = context.
CancellationToken
;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Diagnostics\FixAllProvider\BatchFixerTests.cs (1)
73
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Features (30)
ConvertProgram\ConvertToProgramMainCodeFixProvider.cs (1)
35
var cancellationToken = context.
CancellationToken
;
ConvertProgram\ConvertToTopLevelStatementsCodeFixProvider.cs (1)
38
var cancellationToken = context.
CancellationToken
;
Copilot\CSharpCopilotCodeFixProvider.cs (1)
55
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\AddInheritdoc\AddInheritdocCodeFixProvider.cs (1)
39
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
31
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\ConditionalExpressionInStringInterpolation\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (1)
37
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
40
var switchStatement = (SwitchStatementSyntax)switchLocation.FindNode(getInnermostNodeForTie: true, context.
CancellationToken
);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\CSharpConvertToRecordCodeFixProvider.cs (1)
33
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\DisambiguateSameVariable\CSharpDisambiguateSameVariableCodeFixProvider.cs (1)
41
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
65
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
40
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
50
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.cs (1)
30
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\PassInCapturedVariablesAsArgumentsCodeFixProvider.cs (1)
49
context.
CancellationToken
);
src\Analyzers\CSharp\CodeFixes\MakeMemberRequired\CSharpMakeMemberRequiredCodeFixProvider.cs (1)
36
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (1)
38
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\MakeStatementAsynchronous\CSharpMakeStatementAsynchronousCodeFixProvider.cs (1)
35
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
58
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
45
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
38
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\RemoveInKeyword\RemoveInKeywordCodeFixProvider.cs (1)
35
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\RemoveNewModifier\RemoveNewModifierCodeFixProvider.cs (1)
33
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (3)
40
var syntaxRoot = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
47
var semanticModel = await context.Document.GetRequiredSemanticModelAsync(context.
CancellationToken
).ConfigureAwait(false);
50
context.Document, semanticModel, defaultLiteral, context.
CancellationToken
);
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
83
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (1)
96
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
37
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
58
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
42
var cancellationToken = context.
CancellationToken
;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CodeFixes\ErrorCases\CodeFixExceptionInRegisterMethodAsync.cs (1)
23
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
CodeFixes\CodeFixServiceTests.vb (2)
227
Dim root = Await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(False)
252
Dim root = Await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(False)
Microsoft.CodeAnalysis.Features (46)
AddImport\AbstractAddImportCodeFixProvider.cs (1)
55
var cancellationToken = context.
CancellationToken
;
AddMissingReference\AbstractAddMissingReferenceCodeFixProvider.cs (3)
34
var cancellationToken = context.
CancellationToken
;
51
context.Document.Project, identity, context.
CancellationToken
).ConfigureAwait(false);
60
var cancellationToken = context.
CancellationToken
;
AddPackage\AbstractAddPackageCodeFixProvider.cs (1)
32
var cancellationToken = context.
CancellationToken
;
CodeFixes\Suppression\WrapperCodeFixProvider.cs (2)
28
var suppressionFixes = await SuppressionFixProvider.GetFixesAsync(context.Document, context.Span, documentDiagnostics, context.
CancellationToken
).ConfigureAwait(false);
35
var suppressionFixes = await SuppressionFixProvider.GetFixesAsync(context.Document.Project, projectDiagnostics, context.
CancellationToken
).ConfigureAwait(false);
FullyQualify\AbstractFullyQualifyCodeFixProvider.cs (1)
23
var cancellationToken = context.
CancellationToken
;
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (1)
44
var root = await document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
SimplifyTypeNames\AbstractSimplifyTypeNamesCodeFixProvider.cs (1)
79
var cancellationToken = context.
CancellationToken
;
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (2)
44
var cancellationToken = context.
CancellationToken
;
150
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
36
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (2)
69
var cancellationToken = context.
CancellationToken
;
72
var root = await document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
35
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
63
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
32
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (1)
70
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\ConvertToAsync\AbstractConvertToAsyncCodeFixProvider.cs (2)
32
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
41
node, context.Document, diagnostic, context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
32
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractRemoveDocCommentNodeCodeFixProvider.cs (1)
36
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorCodeFixProvider.cs (1)
22
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (2)
43
var root = await document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
47
var codeActions = await GetCodeActionsAsync(context.Document, name, context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\AbstractImplementAbstractClassCodeFixProvider.cs (1)
26
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceCodeFixProvider.cs (1)
34
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\Iterator\AbstractIteratorCodeFixProvider.cs (2)
28
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
36
var codeAction = await GetCodeFixAsync(root, node, context.Document, diagnostic, context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeMemberStatic\AbstractMakeMemberStaticCodeFixProvider.cs (1)
24
TryGetMemberDeclaration(context.Diagnostics[0].Location.FindNode(context.
CancellationToken
), out _))
src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (1)
37
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
31
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\MakeTypeAbstract\AbstractMakeTypeAbstractCodeFixProvider.cs (1)
24
if (IsValidRefactoringContext(context.Diagnostics[0].Location?.FindNode(context.
CancellationToken
), out _))
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (3)
57
var root = await document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
73
var model = await document.GetRequiredSemanticModelAsync(context.
CancellationToken
).ConfigureAwait(false);
74
var symbol = model.GetDeclaredSymbol(node, context.
CancellationToken
);
src\Analyzers\Core\CodeFixes\OrderModifiers\AbstractOrderModifiersCodeFixProvider.cs (2)
43
var syntaxTree = await context.Document.GetRequiredSyntaxTreeAsync(context.
CancellationToken
).ConfigureAwait(false);
44
var syntaxNode = Location.Create(syntaxTree, context.Span).FindNode(context.
CancellationToken
);
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
32
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\RemoveUnnecessarySuppressions\RemoveUnnecessaryAttributeSuppressionsCodeFixProvider.cs (1)
29
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnnecessarySuppressions\RemoveUnnecessaryPragmaSuppressionsCodeFixProvider.cs (1)
34
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (2)
154
if (IsForEachIterationVariableDiagnostic(diagnostic, context.Document, context.
CancellationToken
))
164
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
32
var cancellationToken = context.
CancellationToken
;
src\Analyzers\Core\CodeFixes\UpdateLegacySuppressions\UpdateLegacySuppressionsCodeFixProvider.cs (1)
30
var root = await context.Document.GetRequiredSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
Microsoft.CodeAnalysis.VisualBasic.Features (12)
CodeFixes\CorrectNextControlVariable\CorrectNextControlVariableCodeFixProvider.vb (1)
37
Dim root = Await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(False)
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (1)
65
Dim root = Await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(False)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (4)
45
Dim root = Await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(False)
56
result = Await GenerateEventFromImplementsAsync(context.Document, qualifiedName, context.
CancellationToken
).ConfigureAwait(False)
61
result = Await GenerateEventFromHandlesAsync(context.Document, handlesClauseItem, context.
CancellationToken
).ConfigureAwait(False)
66
result = Await GenerateEventFromAddRemoveHandlerAsync(context.Document, handlerStatement, context.
CancellationToken
).ConfigureAwait(False)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (1)
61
Dim cancellationToken = context.
CancellationToken
CodeFixes\IncorrectFunctionReturnType\IncorrectFunctionReturnTypeCodeFixProvider.vb (1)
43
Dim cancellationToken = context.
CancellationToken
CodeFixes\MoveToTopOfFile\MoveToTopOfFileCodeFixProvider.vb (1)
46
Dim cancellationToken = context.
CancellationToken
CodeFixes\OverloadBase\OverloadBaseCodeFixProvider.vb (1)
37
Dim root = Await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(False)
RemoveSharedFromModuleMembers\VisualBasicRemoveSharedFromModuleMembersCodeFixProvider.vb (2)
41
Dim tokenToRemove = diagnostic.Location.FindToken(context.
CancellationToken
)
46
Dim node = diagnostic.Location.FindNode(context.
CancellationToken
)
Microsoft.Interop.ComInterfaceGenerator (2)
Analyzers\AddMarshalAsToElementFixer.cs (1)
26
SyntaxNode? root = await doc.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
121
SyntaxNode? root = await doc.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\CustomMarshallerAttributeFixer.cs (1)
112
SyntaxNode? root = await doc.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
121
SyntaxNode? root = await doc.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
Microsoft.ML.InternalCodeAnalyzer (4)
ContractsCheckNameofFixProvider.cs (3)
39
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
133
var semanticModel = await context.Document.GetSemanticModelAsync(context.
CancellationToken
);
134
var type = semanticModel.GetTypeInfo(argParam.Type, context.
CancellationToken
).Type;
NameFixProvider.cs (1)
59
var root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
);
System.Text.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexCodeFixer.cs (1)
45
SyntaxNode? root = await context.Document.GetSyntaxRootAsync(context.
CancellationToken
).ConfigureAwait(false);
System.Windows.Forms.Analyzers.CodeFixes.CSharp (1)
System\Windows\Forms\CSharp\CodeFixes\AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.cs (1)
35
.GetSyntaxRootAsync(context.
CancellationToken
)
System.Windows.Forms.Analyzers.CodeFixes.VisualBasic (1)
AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.vb (1)
41
GetSyntaxRootAsync(context.
CancellationToken
).