49 references to CancellationToken
Microsoft.AspNetCore.App.Analyzers (7)
RouteHandlers\AtMostOneFromBodyAttribute.cs (1)
52
var syntax = symbol.DeclaringSyntaxReferences[0].GetSyntax(context.
CancellationToken
);
RouteHandlers\DisallowMvcBindArgumentsOnParameters.cs (1)
32
var syntax = parameter.DeclaringSyntaxReferences[0].GetSyntax(context.
CancellationToken
);
RouteHandlers\DisallowNonParsableComplexTypesOnParameters.cs (1)
47
var syntax = (ParameterSyntax)handlerDelegateParameter.DeclaringSyntaxReferences[0].GetSyntax(context.
CancellationToken
);
RouteHandlers\RouteHandlerAnalyzer.cs (3)
97
var routeUsage = routeUsageCache.Get(token, context.
CancellationToken
);
127
var syntaxNode = syntaxReference.GetSyntax(context.
CancellationToken
);
129
? invocation.SemanticModel.GetOperation(syntaxNode, context.
CancellationToken
)
WebApplicationBuilder\WebApplicationBuilderAnalyzer.cs (1)
324
var receiverType = invocation.GetReceiverType(context.
CancellationToken
);
Microsoft.CodeAnalysis.CodeStyle (6)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
103
=> ShouldSkipAnalysis(context.FilterTree, context.Options, context.Compilation.Options, notification, context.
CancellationToken
);
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
98
var (isCandidate, written) = TryGetOrInitializeFieldState(fieldReference.Field, operationContext.Options, operationContext.
CancellationToken
);
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (1)
68
if (switchBlock.SyntaxTree.OverlapsHiddenPosition(switchBlock.Span, context.
CancellationToken
))
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
454
var symbolInfo = nameofArgument.SemanticModel!.GetSymbolInfo(nameofArgument.Syntax, operationContext.
CancellationToken
);
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
54
var namedField = GetNamedField(field.ContainingType, field, context.
CancellationToken
);
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
72
var cancellationToken = context.
CancellationToken
;
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (3)
101
var cancellationToken = context.
CancellationToken
;
119
var cancellationToken = context.
CancellationToken
;
141
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
86
if (CSharpSemanticFacts.Instance.IsInExpressionTree(semanticModel, operation.Syntax, infoCache.ExpressionOfTType, context.
CancellationToken
))
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer.cs (1)
96
if (CSharpSemanticFacts.Instance.IsInExpressionTree(semanticModel, syntax, expressionType, context.
CancellationToken
))
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (2)
151
var cancellationToken = context.
CancellationToken
;
170
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
88
if (arrayCreationOperation.Syntax.IsInExpressionTree(semanticModel, expressionType, context.
CancellationToken
))
Microsoft.CodeAnalysis.CSharp.Features (8)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (3)
101
var cancellationToken = context.
CancellationToken
;
119
var cancellationToken = context.
CancellationToken
;
141
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (1)
86
if (CSharpSemanticFacts.Instance.IsInExpressionTree(semanticModel, operation.Syntax, infoCache.ExpressionOfTType, context.
CancellationToken
))
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseNullCheckOverTypeCheckDiagnosticAnalyzer.cs (1)
96
if (CSharpSemanticFacts.Instance.IsInExpressionTree(semanticModel, syntax, expressionType, context.
CancellationToken
))
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (2)
151
var cancellationToken = context.
CancellationToken
;
170
var cancellationToken = context.
CancellationToken
;
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
88
if (arrayCreationOperation.Syntax.IsInExpressionTree(semanticModel, expressionType, context.
CancellationToken
))
Microsoft.CodeAnalysis.Features (6)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
103
=> ShouldSkipAnalysis(context.FilterTree, context.Options, context.Compilation.Options, notification, context.
CancellationToken
);
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
98
var (isCandidate, written) = TryGetOrInitializeFieldState(fieldReference.Field, operationContext.Options, operationContext.
CancellationToken
);
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchDiagnosticAnalyzer.cs (1)
68
if (switchBlock.SyntaxTree.OverlapsHiddenPosition(switchBlock.Span, context.
CancellationToken
))
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
454
var symbolInfo = nameofArgument.SemanticModel!.GetSymbolInfo(nameofArgument.Syntax, operationContext.
CancellationToken
);
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
54
var namedField = GetNamedField(field.ContainingType, field, context.
CancellationToken
);
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
72
var cancellationToken = context.
CancellationToken
;
Microsoft.CodeAnalysis.Test.Utilities (14)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
2943
context.RegisterOperationAction(context => HandleCallback(context.Operation.Syntax.GetLocation(), context.Compilation, context.ReportDiagnostic, context.
CancellationToken
), OperationKind.VariableDeclaration);
Diagnostics\OperationTestAnalyzer.cs (13)
71
if (operationContext.Operation.HasErrors(operationContext.Compilation, operationContext.
CancellationToken
))
547
if (argument.HasErrors(operationContext.Compilation, operationContext.
CancellationToken
))
851
if (initializer != null && !initializer.HasErrors(operationContext.Compilation, operationContext.
CancellationToken
))
910
if (!switchSection.HasErrors(operationContext.Compilation, operationContext.
CancellationToken
) && switchSection.Clauses.Length > 1)
1044
if (eventAssignment.EventReference.Kind == OperationKind.Invalid || eventAssignment.HasErrors(operationContext.Compilation, operationContext.
CancellationToken
))
1264
if (addressOfOperation.Reference.Kind == OperationKind.Invalid && addressOfOperation.HasErrors(operationContext.Compilation, operationContext.
CancellationToken
))
1611
if (!left.HasErrors(operationContext.Compilation, operationContext.
CancellationToken
) &&
1612
!right.HasErrors(operationContext.Compilation, operationContext.
CancellationToken
) &&
1647
if (!operand.HasErrors(operationContext.Compilation, operationContext.
CancellationToken
) && unary.OperatorMethod == null)
1789
if (binary.HasErrors(operationContext.Compilation, operationContext.
CancellationToken
))
1797
if (unary.HasErrors(operationContext.Compilation, operationContext.
CancellationToken
))
1895
if (conversion.HasErrors(operationContext.Compilation, operationContext.
CancellationToken
))
1932
if (forCondition.HasErrors(operationContext.Compilation, operationContext.
CancellationToken
))