1 implementation of IMethodBodyOperation
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
8666internal sealed partial class MethodBodyOperation : BaseMethodBodyBaseOperation, IMethodBodyOperation
56 references to IMethodBodyOperation
Microsoft.AspNetCore.App.Analyzers (1)
RouteHandlers\RouteHandlerAnalyzer.cs (1)
142else if (methodOperation is IMethodBodyOperation methodBody)
Microsoft.AspNetCore.Mvc.Analyzers (1)
TagHelpersInCodeBlocksAnalyzer.cs (1)
75IMethodBodyOperation methodBodyOperation => startBlockContext.OwningSymbol,
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
ApiConventionAnalyzer.cs (1)
48var hasUnreadableStatusCodes = !ActualApiResponseMetadataFactory.TryGetActualResponseMetadata(symbolCache, (IMethodBodyOperation)context.Operation, out var actualResponseMetadata);
Microsoft.CodeAnalysis (7)
Generated\OperationKind.Generated.cs (2)
202/// <summary>Indicates an <see cref="IMethodBodyOperation"/>.</summary> 204/// <summary>Indicates an <see cref="IMethodBodyOperation"/>. Use <see cref="MethodBody"/> instead.</summary>
Generated\Operations.Generated.cs (3)
11221public override IOperation VisitMethodBodyOperation(IMethodBodyOperation operation, object? argument) 11506public virtual void VisitMethodBodyOperation(IMethodBodyOperation operation) => DefaultVisit(operation); 11645public virtual TResult? VisitMethodBodyOperation(IMethodBodyOperation operation, TArgument argument) => DefaultVisit(operation, argument);
Operations\ControlFlowGraph.cs (1)
165public static ControlFlowGraph Create(Operations.IMethodBodyOperation methodBody, CancellationToken cancellationToken = default)
Operations\ControlFlowGraphBuilder.cs (1)
1497public override IOperation? VisitMethodBodyOperation(IMethodBodyOperation operation, int? captureIdForResult)
Microsoft.CodeAnalysis.CSharp (1)
Operations\CSharpOperationFactory.cs (1)
351private IMethodBodyOperation CreateMethodBodyOperation(BoundNonConstructorMethodBody boundNode)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (11)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (6)
206var equalsBodyOperation = (IMethodBodyOperation)semanticModel 208var notEqualsBodyOperation = (IMethodBodyOperation)semanticModel 222var operation = (IMethodBodyOperation)semanticModel.GetRequiredOperation(method, cancellationToken);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (5)
25IMethodBodyOperation methodBodyOperation, 77IMethodBodyOperation methodOperation, 105public static bool IsDefaultEqualsOperator(IMethodBodyOperation operation) 127IMethodBodyOperation operation) 494IMethodBodyOperation operation,
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (3)
CodeGen\CodeGenOperators.cs (3)
5409ControlFlowGraph.Create((IMethodBodyOperation)model.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Calculate").Single())); 5699ControlFlowGraph.Create((IMethodBodyOperation)model.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Calculate").Single())); 5735ControlFlowGraph.Create((IMethodBodyOperation)model.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Where(m => m.Identifier.ValueText == "Calculate").Single()));
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (3)
EndToEndTests.cs (3)
498var operation = (Microsoft.CodeAnalysis.Operations.IMethodBodyOperation)model.GetOperation(node); 887Assert.NotNull(ControlFlowGraph.Create((IMethodBodyOperation)operation));
Microsoft.CodeAnalysis.CSharp.Features (11)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (6)
206var equalsBodyOperation = (IMethodBodyOperation)semanticModel 208var notEqualsBodyOperation = (IMethodBodyOperation)semanticModel 222var operation = (IMethodBodyOperation)semanticModel.GetRequiredOperation(method, cancellationToken);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (5)
25IMethodBodyOperation methodBodyOperation, 77IMethodBodyOperation methodOperation, 105public static bool IsDefaultEqualsOperator(IMethodBodyOperation operation) 127IMethodBodyOperation operation) 494IMethodBodyOperation operation,
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (4)
IOperation\IOperationTests_IAnonymousFunctionExpression.cs (2)
847var graphM = ControlFlowGraph.Create((IMethodBodyOperation)semanticModel.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single())); 902var graphM = ControlFlowGraph.Create((IMethodBodyOperation)semanticModel.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().Single()));
IOperation\IOperationTests_ILocalFunctionStatement.cs (2)
1793var graphM = ControlFlowGraph.Create((IMethodBodyOperation)semanticModel.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().First())); 1848var graphM = ControlFlowGraph.Create((IMethodBodyOperation)semanticModel.GetOperation(tree.GetRoot().DescendantNodes().OfType<MethodDeclarationSyntax>().First()));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\TopLevelStatementsTests.cs (3)
204Assert.NotNull(ControlFlowGraph.Create((IMethodBodyOperation)((IBlockOperation)operation1.Parent.Parent).Parent)); 332Assert.NotNull(ControlFlowGraph.Create((IMethodBodyOperation)((IBlockOperation)operation1.Parent.Parent).Parent)); 370Assert.NotNull(ControlFlowGraph.Create((IMethodBodyOperation)((IBlockOperation)operation2.Parent).Parent));
Microsoft.CodeAnalysis.Features (1)
ValueTracking\ValueTracker.OperationCollector.cs (1)
38IMethodBodyOperation methodBodyOperation => VisitReturnDescendentsAsync(methodBodyOperation, allowImplicit: true, cancellationToken),
Microsoft.CodeAnalysis.Test.Utilities (5)
Compilation\CompilationExtensions.cs (1)
374case IMethodBodyOperation methodBody:
Compilation\ControlFlowGraphVerifier.cs (1)
48case IMethodBodyOperation methodBodyOperation:
Compilation\OperationTreeVerifier.cs (2)
2101public override void VisitMethodBodyOperation(IMethodBodyOperation operation) 2103LogString(nameof(IMethodBodyOperation));
Compilation\TestOperationVisitor.cs (1)
1657public override void VisitMethodBodyOperation(IMethodBodyOperation operation)
Microsoft.CodeAnalysis.UnitTests (4)
Diagnostics\OperationTests.cs (4)
125Assert.Throws<ArgumentNullException>(() => ControlFlowGraph.Create((IMethodBodyOperation)null)); 243IMethodBodyOperation methodBody = new MethodBodyOperation( 332var operation = (IMethodBodyOperation)model.GetOperation(methodBodySyntax);