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