2 implementations of IsImplicit
Microsoft.CodeAnalysis (1)
Operations\Operation.cs (1)
60public bool IsImplicit { get; }
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\CollectionExpressionTests.cs (1)
27098bool IOperation.IsImplicit => throw null;
172 references to IsImplicit
ILLink.RoslynAnalyzer (1)
IOperationExtensions.cs (1)
40 !localReference.IsImplicit) // Workaround for https://github.com/dotnet/roslyn/issues/30753
Metrics (10)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (2)
115if (operation.IsImplicit) 331return !operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null && o.Kind is not (OperationKind.Branch or OperationKindEx.Attribute)));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
295if (!operation.IsImplicit && hasConditionalLogic(operation))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (5)
140if (operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null))) 164if (!operation.IsImplicit) 176if (!operation.IsImplicit) 816if (!current.IsImplicit && 936!localReference.IsImplicit) // Workaround for https://github.com/dotnet/roslyn/issues/30753
src\RoslynAnalyzers\Utilities\Compiler\Extensions\OperationBlockAnalysisContextExtension.cs (2)
48body.Operations[1] is ILabeledOperation labeledOp && labeledOp.IsImplicit && 49body.Operations[2] is IReturnOperation returnOp && returnOp.IsImplicit);
Metrics.Legacy (10)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (2)
115if (operation.IsImplicit) 331return !operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null && o.Kind is not (OperationKind.Branch or OperationKindEx.Attribute)));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
295if (!operation.IsImplicit && hasConditionalLogic(operation))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (5)
140if (operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null))) 164if (!operation.IsImplicit) 176if (!operation.IsImplicit) 816if (!current.IsImplicit && 936!localReference.IsImplicit) // Workaround for https://github.com/dotnet/roslyn/issues/30753
src\RoslynAnalyzers\Utilities\Compiler\Extensions\OperationBlockAnalysisContextExtension.cs (2)
48body.Operations[1] is ILabeledOperation labeledOp && labeledOp.IsImplicit && 49body.Operations[2] is IReturnOperation returnOp && returnOp.IsImplicit);
Microsoft.AspNetCore.App.Analyzers (1)
Authorization\AddAuthorizationBuilderAnalyzer.cs (1)
77.Where(operation => operation is not IReturnOperation { IsImplicit: true })
Microsoft.CodeAnalysis (13)
DiagnosticAnalyzer\AnalyzerDriver.cs (3)
2975Debug.Assert(!operationBlock.Parent.IsImplicit); 2983Debug.Assert(operationBlock.Parent.IsImplicit); 2986Debug.Assert(!operationBlock.Parent.Parent.IsImplicit);
Operations\ControlFlowGraphBuilder.cs (3)
84return _forceImplicit || operation.IsImplicit; 860!value.IsImplicit || 6586Debug.Assert(operation.IsImplicit);
Operations\OperationCloner.cs (6)
21return new NoneOperation(VisitArray(((Operation)operation).ChildOperations.ToImmutableArray()), ((Operation)operation).OwningSemanticModel, operation.Syntax, operation.Type, operation.GetConstantValue(), operation.IsImplicit); 27return new FlowAnonymousFunctionOperation(in anonymous.Context, anonymous.Original, operation.IsImplicit); 32return new DynamicObjectCreationOperation(Visit(operation.Initializer), VisitArray(operation.Arguments), ((HasDynamicArgumentsExpression)operation).ArgumentNames, ((HasDynamicArgumentsExpression)operation).ArgumentRefKinds, ((Operation)operation).OwningSemanticModel, operation.Syntax, operation.Type, operation.IsImplicit); 37return new DynamicInvocationOperation(Visit(operation.Operation), VisitArray(operation.Arguments), ((HasDynamicArgumentsExpression)operation).ArgumentNames, ((HasDynamicArgumentsExpression)operation).ArgumentRefKinds, ((Operation)operation).OwningSemanticModel, operation.Syntax, operation.Type, operation.IsImplicit); 42return new DynamicIndexerAccessOperation(Visit(operation.Operation), VisitArray(operation.Arguments), ((HasDynamicArgumentsExpression)operation).ArgumentNames, ((HasDynamicArgumentsExpression)operation).ArgumentRefKinds, ((Operation)operation).OwningSemanticModel, operation.Syntax, operation.Type, operation.IsImplicit); 47return new InvalidOperation(VisitArray(((InvalidOperation)operation).Children), ((Operation)operation).OwningSemanticModel, operation.Syntax, operation.Type, operation.GetConstantValue(), operation.IsImplicit);
Operations\OperationMapBuilder.cs (1)
109if (!operation.IsImplicit)
Microsoft.CodeAnalysis.Analyzers (12)
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (1)
318if (conversion.IsImplicit)
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (1)
112&& invocation.Arguments[0].IsImplicit;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (2)
115if (operation.IsImplicit) 331return !operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null && o.Kind is not (OperationKind.Branch or OperationKindEx.Attribute)));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
295if (!operation.IsImplicit && hasConditionalLogic(operation))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (5)
140if (operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null))) 164if (!operation.IsImplicit) 176if (!operation.IsImplicit) 816if (!current.IsImplicit && 936!localReference.IsImplicit) // Workaround for https://github.com/dotnet/roslyn/issues/30753
src\RoslynAnalyzers\Utilities\Compiler\Extensions\OperationBlockAnalysisContextExtension.cs (2)
48body.Operations[1] is ILabeledOperation labeledOp && labeledOp.IsImplicit && 49body.Operations[2] is IReturnOperation returnOp && returnOp.IsImplicit);
Microsoft.CodeAnalysis.AnalyzerUtilities (12)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (2)
115if (operation.IsImplicit) 331return !operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null && o.Kind is not (OperationKind.Branch or OperationKindEx.Attribute)));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
295if (!operation.IsImplicit && hasConditionalLogic(operation))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (5)
140if (operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null))) 164if (!operation.IsImplicit) 176if (!operation.IsImplicit) 816if (!current.IsImplicit && 936!localReference.IsImplicit) // Workaround for https://github.com/dotnet/roslyn/issues/30753
src\RoslynAnalyzers\Utilities\Compiler\Extensions\OperationBlockAnalysisContextExtension.cs (2)
48body.Operations[1] is ILabeledOperation labeledOp && labeledOp.IsImplicit && 49body.Operations[2] is IReturnOperation returnOp && returnOp.IsImplicit);
src\RoslynAnalyzers\Utilities\FlowAnalysis\Extensions\BasicBlockExtensions.cs (1)
154if (!operation.IsImplicit)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResult.cs (1)
132if (!kvp.Key.IsImplicit)
Microsoft.CodeAnalysis.BannedApiAnalyzers (10)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (2)
115if (operation.IsImplicit) 331return !operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null && o.Kind is not (OperationKind.Branch or OperationKindEx.Attribute)));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
295if (!operation.IsImplicit && hasConditionalLogic(operation))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (5)
140if (operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null))) 164if (!operation.IsImplicit) 176if (!operation.IsImplicit) 816if (!current.IsImplicit && 936!localReference.IsImplicit) // Workaround for https://github.com/dotnet/roslyn/issues/30753
src\RoslynAnalyzers\Utilities\Compiler\Extensions\OperationBlockAnalysisContextExtension.cs (2)
48body.Operations[1] is ILabeledOperation labeledOp && labeledOp.IsImplicit && 49body.Operations[2] is IReturnOperation returnOp && returnOp.IsImplicit);
Microsoft.CodeAnalysis.CodeStyle (8)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
80var statements = blockOperation.Operations.WhereAsArray(o => !o.IsImplicit);
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (2)
74case IConversionOperation { IsImplicit: true } conversion: 251if (invocation.Instance is { IsImplicit: false })
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForReturn\UseConditionalExpressionForReturnHelpers.cs (1)
62if (falseStatement.IsImplicit)
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
243if (operation is IConversionOperation conversion && conversion.IsImplicit)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (3)
59if (operation is ILocalReferenceOperation { IsDeclaration: true, IsImplicit: false }) 442if (operation.IsImplicit) 462=> value is IConversionOperation conversion && conversion.IsImplicit
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (1)
183conversion.IsImplicit &&
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
213if (localDeclaration.IsImplicit)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
430return operation is IConversionOperation conversion && conversion.IsImplicit
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (1)
181return statementIndex > 0 && blockStatement.Operations[statementIndex - 1] is { IsImplicit: false, Syntax: var priorSyntax }
Microsoft.CodeAnalysis.CSharp (3)
Operations\CSharpOperationFactory.cs (3)
1050Debug.Assert(isImplicit || target.Syntax != syntax || target.IsImplicit || boundConversion.ConversionGroupOpt != null); 1052isImplicit = isImplicit || (target.Syntax == syntax && !target.IsImplicit); 2359Debug.Assert(valueOperation.IsImplicit);
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
270if (!instanceOperation.IsImplicit &&
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
95if (arrayCreationOperation.IsImplicit && elements.Length == 0)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
92IsImplicit: false, 106if (current.Parent is IConversionOperation { Type: { } parentConversionType, IsImplicit: false } &&
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
583IsImplicit: false,
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
154if (!instanceReference.IsImplicit)
Microsoft.CodeAnalysis.CSharp.Features (6)
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
910if (operation is IConversionOperation conversion && conversion.IsImplicit)
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (1)
116if (instance.IsImplicit && syntaxFacts.IsSimpleName(identifierName))
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
270if (!instanceOperation.IsImplicit &&
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
95if (arrayCreationOperation.IsImplicit && elements.Length == 0)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
583IsImplicit: false,
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
154if (!instanceReference.IsImplicit)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
92IsImplicit: false, 106if (current.Parent is IConversionOperation { Type: { } parentConversionType, IsImplicit: false } &&
Microsoft.CodeAnalysis.Features (11)
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
389return (collection is IConversionOperation conversion && conversion.IsImplicit)
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (2)
510return statementIndex > 0 && blockStatement.Operations[statementIndex - 1] is { IsImplicit: false, Syntax: var priorSyntax } 537if (statement.IsImplicit)
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (1)
505&& argumentOperation.IsImplicit)
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (2)
74case IConversionOperation { IsImplicit: true } conversion: 251if (invocation.Instance is { IsImplicit: false })
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForReturn\UseConditionalExpressionForReturnHelpers.cs (1)
62if (falseStatement.IsImplicit)
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
243if (operation is IConversionOperation conversion && conversion.IsImplicit)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (1)
183conversion.IsImplicit &&
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
213if (localDeclaration.IsImplicit)
ValueTracking\ValueTracker.OperationCollector.cs (1)
47var returnOperations = operation.Descendants().Where(d => d is IReturnOperation && (allowImplicit || !d.IsImplicit));
Microsoft.CodeAnalysis.ResxSourceGenerator (10)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (2)
115if (operation.IsImplicit) 331return !operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null && o.Kind is not (OperationKind.Branch or OperationKindEx.Attribute)));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
295if (!operation.IsImplicit && hasConditionalLogic(operation))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (5)
140if (operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null))) 164if (!operation.IsImplicit) 176if (!operation.IsImplicit) 816if (!current.IsImplicit && 936!localReference.IsImplicit) // Workaround for https://github.com/dotnet/roslyn/issues/30753
src\RoslynAnalyzers\Utilities\Compiler\Extensions\OperationBlockAnalysisContextExtension.cs (2)
48body.Operations[1] is ILabeledOperation labeledOp && labeledOp.IsImplicit && 49body.Operations[2] is IReturnOperation returnOp && returnOp.IsImplicit);
Microsoft.CodeAnalysis.Test.Utilities (20)
Compilation\CompilationExtensions.cs (1)
329if (!operation.IsImplicit)
Compilation\ControlFlowGraphVerifier.cs (1)
997assignment.IsImplicit &&
Compilation\OperationTreeVerifier.cs (3)
123if (operation.IsImplicit) 309if (!operation.IsImplicit) 1038if (operation.IsImplicit)
Compilation\TestOperationVisitor.cs (12)
63var isImplicit = operation.IsImplicit; 196if (!descendant.IsImplicit) 558Assert.False(operation.Instance.IsImplicit, $"Implicit {nameof(IInstanceReferenceOperation)} on {operation.Syntax}"); 588Assert.True(operation.Descendants().All(n => n.IsImplicit), $"Explicit node in default argument value ({operation.Syntax.RawKind}): {operation.Syntax.ToString()}"); 668Assert.False(operation.Instance.IsImplicit, $"Implicit {nameof(IInstanceReferenceOperation)} on {operation.Syntax}"); 1702Assert.True(operation.IsImplicit); 1734Assert.True(operation.IsImplicit); 1741Assert.True(operation.IsImplicit); 1748Assert.True(operation.IsImplicit); 1755Assert.True(operation.IsImplicit); 1799Assert.True(operation.DeclarationGroup.IsImplicit); 1803_ = operation.IsImplicit;
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (2)
69bool isImplicit = increment.IsImplicit; 284if (conversion.IsImplicit)
Diagnostics\OperationTestAnalyzer.cs (1)
954operationContext.ReportDiagnostic(Diagnostic.Create(instanceReference.IsImplicit ? ImplicitInstanceDescriptor : ExplicitInstanceDescriptor,
Microsoft.CodeAnalysis.Workspaces (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (3)
59if (operation is ILocalReferenceOperation { IsDeclaration: true, IsImplicit: false }) 442if (operation.IsImplicit) 462=> value is IConversionOperation conversion && conversion.IsImplicit
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
430return operation is IConversionOperation conversion && conversion.IsImplicit
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (1)
181return statementIndex > 0 && blockStatement.Operations[statementIndex - 1] is { IsImplicit: false, Syntax: var priorSyntax }
Roslyn.Diagnostics.Analyzers (10)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (2)
115if (operation.IsImplicit) 331return !operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null && o.Kind is not (OperationKind.Branch or OperationKindEx.Attribute)));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
295if (!operation.IsImplicit && hasConditionalLogic(operation))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (5)
140if (operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null))) 164if (!operation.IsImplicit) 176if (!operation.IsImplicit) 816if (!current.IsImplicit && 936!localReference.IsImplicit) // Workaround for https://github.com/dotnet/roslyn/issues/30753
src\RoslynAnalyzers\Utilities\Compiler\Extensions\OperationBlockAnalysisContextExtension.cs (2)
48body.Operations[1] is ILabeledOperation labeledOp && labeledOp.IsImplicit && 49body.Operations[2] is IReturnOperation returnOp && returnOp.IsImplicit);
Roslyn.Diagnostics.CSharp.Analyzers (1)
PreferNullLiteral.cs (1)
45if (context.Operation.IsImplicit)
Test.Utilities (7)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (5)
140if (operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null))) 164if (!operation.IsImplicit) 176if (!operation.IsImplicit) 816if (!current.IsImplicit && 936!localReference.IsImplicit) // Workaround for https://github.com/dotnet/roslyn/issues/30753
src\RoslynAnalyzers\Utilities\Compiler\Extensions\OperationBlockAnalysisContextExtension.cs (2)
48body.Operations[1] is ILabeledOperation labeledOp && labeledOp.IsImplicit && 49body.Operations[2] is IReturnOperation returnOp && returnOp.IsImplicit);
Text.Analyzers (10)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (2)
115if (operation.IsImplicit) 331return !operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null && o.Kind is not (OperationKind.Branch or OperationKindEx.Attribute)));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
295if (!operation.IsImplicit && hasConditionalLogic(operation))
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (5)
140if (operation.DescendantsAndSelf().All(o => o.IsImplicit || (!o.ConstantValue.HasValue && o.Type == null))) 164if (!operation.IsImplicit) 176if (!operation.IsImplicit) 816if (!current.IsImplicit && 936!localReference.IsImplicit) // Workaround for https://github.com/dotnet/roslyn/issues/30753
src\RoslynAnalyzers\Utilities\Compiler\Extensions\OperationBlockAnalysisContextExtension.cs (2)
48body.Operations[1] is ILabeledOperation labeledOp && labeledOp.IsImplicit && 49body.Operations[2] is IReturnOperation returnOp && returnOp.IsImplicit);