291 references to Operation
Aspire.Hosting.Analyzers (1)
ILLink.RoslynAnalyzer (3)
Microsoft.Analyzers.Extra (9)
Microsoft.Analyzers.Local (4)
Microsoft.AspNetCore.Analyzers (3)
Microsoft.AspNetCore.App.Analyzers (8)
Microsoft.AspNetCore.Components.Analyzers (6)
Microsoft.AspNetCore.Components.SdkAnalyzers (6)
Microsoft.AspNetCore.Mvc.Analyzers (5)
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
Microsoft.CodeAnalysis (4)
Microsoft.CodeAnalysis.CodeStyle (32)
Microsoft.CodeAnalysis.CSharp.CodeStyle (15)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (26)
Semantics\PrimaryConstructorTests.cs (13)
4328Assert.Equal(SyntaxKind.ClassDeclaration, context.Operation.Syntax.Kind());
4332Assert.Equal(SyntaxKind.ClassDeclaration, context.Operation.Syntax.Kind());
4336Assert.Equal(SyntaxKind.ConstructorDeclaration, context.Operation.Syntax.Kind());
4350Assert.Equal(SyntaxKind.PrimaryConstructorBaseType, context.Operation.Syntax.Kind());
4351VerifyOperationTree((CSharpCompilation)context.Compilation, context.Operation,
4365Assert.Equal(SyntaxKind.BaseConstructorInitializer, context.Operation.Syntax.Kind());
4366VerifyOperationTree((CSharpCompilation)context.Compilation, context.Operation,
4386switch (context.Operation.Syntax.ToString())
4432switch (context.Operation.Syntax.ToString())
5696Assert.Equal(SyntaxKind.RecordDeclaration, context.Operation.Syntax.Kind());
5697VerifyOperationTree((CSharpCompilation)context.Compilation, context.Operation, @"");
5713switch (context.Operation.Syntax.ToString())
5731switch (context.Operation.Syntax.ToString())
Microsoft.CodeAnalysis.CSharp.Features (15)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (13)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
Microsoft.CodeAnalysis.Features (31)
Microsoft.CodeAnalysis.Test.Utilities (89)
Diagnostics\CommonDiagnosticAnalyzers.cs (17)
1314var rootOperation = operationContext.Operation.GetRootOperation();
1353ReportDiagnostic(operationContext.ReportDiagnostic, operationContext.Operation.Syntax.GetLocation());
1365ReportDiagnostic(operationContext.ReportDiagnostic, operationContext.Operation.Syntax.GetLocation());
1440AnalyzerFieldReferenceOperation((IFieldReferenceOperation)operationAnalysisContext.Operation, operationAnalysisContext.ReportDiagnostic);
1466var diagnostic = Diagnostic.Create(Descriptor, operationContext.Operation.Syntax.GetLocation(), operationContext.ContainingSymbol.Name);
2074operationContext.ReportDiagnostic(Diagnostic.Create(OperationRule, Location.None, symbolStartContext.Symbol.Name, operationContext.ContainingSymbol.Name, operationContext.Operation.Syntax.ToString(), _analyzerId));
2149diagnostics.Add(Diagnostic.Create(OperationOrderingRule, Location.None, symbolStartContext.Symbol, operationContext.Operation.Syntax.ToString(), _analyzerId));
2758ReportDiagnostics($"RegisterOperationAction({operationContext.Operation.Syntax}) in RegisterSymbolStartAction", operationContext.Operation.Syntax.SyntaxTree, operationContext.ContainingSymbol, operationContext.ReportDiagnostic),
2772ReportDiagnostics($"RegisterOperationAction({operationContext.Operation.Syntax})", operationContext.Operation.Syntax.SyntaxTree, operationContext.ContainingSymbol, operationContext.ReportDiagnostic),
2785ReportDiagnostics($"RegisterOperationAction({operationContext.Operation.Syntax}) in RegisterOperationBlockStartAction", operationContext.Operation.Syntax.SyntaxTree, operationContext.ContainingSymbol, operationContext.ReportDiagnostic),
2888context => context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Operation.Syntax.GetLocation())),
2943context.RegisterOperationAction(context => HandleCallback(context.Operation.Syntax.GetLocation(), context.Compilation, context.ReportDiagnostic, context.CancellationToken), OperationKind.VariableDeclaration);
3017context.RegisterOperationAction(operationContext => AnalyzedOperations.Add(operationContext.Operation), OperationKind.VariableDeclaration);
3045operationBlockStartContext.RegisterOperationAction(operationContext => AnalyzedOperationsInsideOperationBlock.Add(operationContext.Operation), OperationKind.VariableDeclaration);
Diagnostics\OperationTestAnalyzer.cs (55)
56var invalidOperation = (IInvalidOperation)operationContext.Operation;
59operationContext.ReportDiagnostic(Diagnostic.Create(InvalidStatementDescriptor, operationContext.Operation.Syntax.GetLocation()));
63operationContext.ReportDiagnostic(Diagnostic.Create(InvalidExpressionDescriptor, operationContext.Operation.Syntax.GetLocation()));
71if (operationContext.Operation.HasErrors(operationContext.Compilation, operationContext.CancellationToken))
73operationContext.ReportDiagnostic(Diagnostic.Create(IsInvalidDescriptor, operationContext.Operation.Syntax.GetLocation()));
109operationContext.ReportDiagnostic(Diagnostic.Create(ExpressionDescriptor, operationContext.Operation.Syntax.GetLocation()));
146ILoopOperation loop = (ILoopOperation)operationContext.Operation;
338ISwitchOperation switchOperation = (ISwitchOperation)operationContext.Operation;
543IInvocationOperation invocation = (IInvocationOperation)operationContext.Operation;
630ILiteralOperation literal = (ILiteralOperation)operationContext.Operation;
667var argument = (IArgumentOperation)operationContext.Operation;
715var initializer = operationContext.Operation;
752var assignment = (ISimpleAssignmentOperation)operationContext.Operation;
794var initializer = (IArrayInitializerOperation)operationContext.Operation;
842var declarationStatement = (IVariableDeclarationGroupOperation)operationContext.Operation;
899switch (operationContext.Operation.Kind)
902var caseClause = (ICaseClauseOperation)operationContext.Operation;
909var switchSection = (ISwitchCaseOperation)operationContext.Operation;
953IInstanceReferenceOperation instanceReference = (IInstanceReferenceOperation)operationContext.Operation;
1034operationContext.ReportDiagnostic(Diagnostic.Create(EventReferenceDescriptor, operationContext.Operation.Syntax.GetLocation()));
1041IEventAssignmentOperation eventAssignment = (IEventAssignmentOperation)operationContext.Operation;
1042operationContext.ReportDiagnostic(Diagnostic.Create(eventAssignment.Adds ? HandlerAddedDescriptor : HandlerRemovedDescriptor, operationContext.Operation.Syntax.GetLocation()));
1054operationContext.ReportDiagnostic(Diagnostic.Create(PropertyReferenceDescriptor, operationContext.Operation.Syntax.GetLocation()));
1061operationContext.ReportDiagnostic(Diagnostic.Create(FieldReferenceDescriptor, operationContext.Operation.Syntax.GetLocation()));
1068operationContext.ReportDiagnostic(Diagnostic.Create(MethodBindingDescriptor, operationContext.Operation.Syntax.GetLocation()));
1100IInvocationOperation invocation = (IInvocationOperation)operationContext.Operation;
1122IObjectCreationOperation creation = (IObjectCreationOperation)operationContext.Operation;
1181IFieldInitializerOperation equalsValue = (IFieldInitializerOperation)operationContext.Operation;
1192IParameterInitializerOperation equalsValue = (IParameterInitializerOperation)operationContext.Operation;
1226operationContext.ReportDiagnostic(Diagnostic.Create(NoneOperationDescriptor, operationContext.Operation.Syntax.GetLocation()));
1261var addressOfOperation = (IAddressOfOperation)operationContext.Operation;
1313var lambdaExpression = (IAnonymousFunctionOperation)operationContext.Operation;
1314operationContext.ReportDiagnostic(Diagnostic.Create(LambdaExpressionDescriptor, operationContext.Operation.Syntax.GetLocation()));
1323operationContext.ReportDiagnostic(Diagnostic.Create(TooManyStatementsInLambdaExpressionDescriptor, operationContext.Operation.Syntax.GetLocation()));
1336operationContext.ReportDiagnostic(Diagnostic.Create(NoneOperationInLambdaExpressionDescriptor, operationContext.Operation.Syntax.GetLocation()));
1378var operation = operationContext.Operation;
1449ILabelSymbol label = ((ILabeledOperation)operationContext.Operation).Label;
1452operationContext.ReportDiagnostic(Diagnostic.Create(LabelDescriptor, operationContext.Operation.Syntax.GetLocation()));
1460IBranchOperation branch = (IBranchOperation)operationContext.Operation;
1515IBinaryOperation binary = (IBinaryOperation)operationContext.Operation;
1531IUnaryOperation unary = (IUnaryOperation)operationContext.Operation;
1569var binary = (IBinaryOperation)operationContext.Operation;
1608var binary = (IBinaryOperation)operationContext.Operation;
1640var unary = (IUnaryOperation)operationContext.Operation;
1696collector.Visit(operationContext.Operation);
1785var operation = operationContext.Operation;
1845IConditionalAccessOperation conditionalAccess = (IConditionalAccessOperation)operationContext.Operation;
1856IConditionalAccessInstanceOperation conditionalAccessInstance = (IConditionalAccessInstanceOperation)operationContext.Operation;
1894var conversion = (IConversionOperation)operationContext.Operation;
1926ILoopOperation loop = (ILoopOperation)operationContext.Operation;
1971var unary = (IUnaryOperation)operationContext.Operation;
2015operationContext.ReportDiagnostic(Diagnostic.Create(AssignmentOperationDescriptor, operationContext.Operation.Syntax.GetLocation()));
2051var literal = (ILiteralOperation)operationContext.Operation;
2080Diagnostic.Create(OperationActionDescriptor, operationContext.Operation.Syntax.GetLocation(), "Operation", "Analysis"));
2111Diagnostic.Create(OperationActionDescriptor, operationContext.Operation.Syntax.GetLocation(), "Operation", "CompilationStart within Analysis"));
Microsoft.CodeAnalysis.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.Interop.ComInterfaceGenerator (3)
Microsoft.Interop.LibraryImportGenerator (2)
System.Private.CoreLib.Generators (1)
System.Text.RegularExpressions.Generator (2)