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;
80 references to IsImplicit
ILLink.RoslynAnalyzer (1)
IOperationExtensions.cs (1)
40 !localReference.IsImplicit) // Workaround for https://github.com/dotnet/roslyn/issues/30753
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)
2957Debug.Assert(!operationBlock.Parent.IsImplicit); 2965Debug.Assert(operationBlock.Parent.IsImplicit); 2968Debug.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.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)
66case IConversionOperation { IsImplicit: true } conversion: 237if (invocation.Instance is { IsImplicit: false })
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForReturn\UseConditionalExpressionForReturnHelpers.cs (1)
60if (falseStatement.IsImplicit)
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
244if (operation is IConversionOperation conversion && conversion.IsImplicit)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (3)
53!localReference.IsImplicit) // Workaround for https://github.com/dotnet/roslyn/issues/30753 439if (operation.IsImplicit) 459=> value is IConversionOperation conversion && conversion.IsImplicit
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (1)
176conversion.IsImplicit &&
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
204if (localDeclaration.IsImplicit)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
432return 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)
271if (!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)
584IsImplicit: false,
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
156if (!instanceReference.IsImplicit)
Microsoft.CodeAnalysis.CSharp.Features (6)
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
911if (operation is IConversionOperation conversion && conversion.IsImplicit)
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (1)
116if (instance.IsImplicit && syntaxFacts.IsSimpleName(identifierName))
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
271if (!instanceOperation.IsImplicit &&
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
95if (arrayCreationOperation.IsImplicit && elements.Length == 0)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
584IsImplicit: false,
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
156if (!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)
438return statementIndex > 0 && blockStatement.Operations[statementIndex - 1] is { IsImplicit: false, Syntax: var priorSyntax } 465if (statement.IsImplicit)
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (1)
505&& argumentOperation.IsImplicit)
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (2)
66case IConversionOperation { IsImplicit: true } conversion: 237if (invocation.Instance is { IsImplicit: false })
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForReturn\UseConditionalExpressionForReturnHelpers.cs (1)
60if (falseStatement.IsImplicit)
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (1)
244if (operation is IConversionOperation conversion && conversion.IsImplicit)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (1)
176conversion.IsImplicit &&
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
204if (localDeclaration.IsImplicit)
ValueTracking\ValueTracker.OperationCollector.cs (1)
47var returnOperations = operation.Descendants().Where(d => d is IReturnOperation && (allowImplicit || !d.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)
53!localReference.IsImplicit) // Workaround for https://github.com/dotnet/roslyn/issues/30753 439if (operation.IsImplicit) 459=> value is IConversionOperation conversion && conversion.IsImplicit
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (1)
432return 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 }