1 implementation of ILiteralOperation
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5074internal sealed partial class LiteralOperation : Operation, ILiteralOperation
48 references to ILiteralOperation
ILLink.RoslynAnalyzer (2)
DataFlow\FeatureChecksVisitor.cs (2)
71 public override FeatureChecksValue VisitLiteral (ILiteralOperation operation, StateValue state) 82 if (operation is not ILiteralOperation literal)
Microsoft.Analyzers.Extra (1)
CallAnalysis\Fixers\LegacyLoggingFixer.FixDetails.cs (1)
109case ILiteralOperation lit:
Microsoft.AspNetCore.App.Analyzers (3)
Http\HeaderDictionaryIndexerAnalyzer.cs (1)
35propertyReference.Arguments[0].Value is ILiteralOperation literalOperation &&
RouteHandlers\DetectAmbiguousRoutes.cs (2)
256else if (argument1 is ILiteralOperation literal && argument2 is ILiteralOperation otherLiteral)
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzer.cs (1)
169var constantValue = ((ILiteralOperation)operation).ConstantValue;
Microsoft.CodeAnalysis (9)
Generated\OperationKind.Generated.cs (1)
57/// <summary>Indicates an <see cref="ILiteralOperation"/>.</summary>
Generated\Operations.Generated.cs (3)
10891public override IOperation VisitLiteral(ILiteralOperation operation, object? argument) 11435public virtual void VisitLiteral(ILiteralOperation operation) => DefaultVisit(operation); 11574public virtual TResult? VisitLiteral(ILiteralOperation operation, TArgument argument) => DefaultVisit(operation, argument);
Operations\ControlFlowGraphBuilder.cs (5)
7056Debug.Assert(interpolation.FormatString is ILiteralOperation or IConversionOperation { Operand: ILiteralOperation }); 7069Debug.Assert(interpolatedStringText.Text is ILiteralOperation or IConversionOperation { Operand: ILiteralOperation }); 7102public override IOperation VisitLiteral(ILiteralOperation operation, int? captureIdForResult)
Microsoft.CodeAnalysis.CodeStyle (3)
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
90if (invocation.Arguments[0].Value is ILiteralOperation { ConstantValue: { HasValue: true, Value: string value } } literal &&
src\Analyzers\Core\Analyzers\UseConditionalExpression\UseConditionalExpressionHelpers.cs (1)
105=> trueValue is ILiteralOperation { ConstantValue: { HasValue: true, Value: bool value } } && value == val;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
378=> operand is ILiteralOperation { ConstantValue: { HasValue: true, Value: null } };
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
235if (unwrapped is not ILiteralOperation and
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (3)
423=> CanSimplifyToLengthEqualsZeroExpression(leftOperand, (ILiteralOperation)rightOperand), 425=> CanSimplifyToLengthEqualsZeroExpression(rightOperand, (ILiteralOperation)leftOperand), 438IOperation variableExpression, ILiteralOperation numericLiteralExpression)
Microsoft.CodeAnalysis.CSharp (1)
Operations\CSharpOperationFactory.cs (1)
674internal ILiteralOperation CreateBoundLiteralOperation(BoundLiteral boundLiteral, bool @implicit = false)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
704ReturnedValue: ILiteralOperation 888ReturnedValue: ILiteralOperation
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
704ReturnedValue: ILiteralOperation 888ReturnedValue: ILiteralOperation
Microsoft.CodeAnalysis.Features (6)
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
90if (invocation.Arguments[0].Value is ILiteralOperation { ConstantValue: { HasValue: true, Value: string value } } literal &&
src\Analyzers\Core\Analyzers\UseConditionalExpression\UseConditionalExpressionHelpers.cs (1)
105=> trueValue is ILiteralOperation { ConstantValue: { HasValue: true, Value: bool value } } && value == val;
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
235if (unwrapped is not ILiteralOperation and
ValueTracking\ValueTracker.OperationCollector.cs (3)
29ILiteralOperation literalOperation => VisitLiteralAsync(literalOperation, cancellationToken), 152private Task VisitLiteralAsync(ILiteralOperation literalOperation, CancellationToken cancellationToken) 268if (argumentOperation.Value is ILiteralOperation)
Microsoft.CodeAnalysis.Test.Utilities (7)
Compilation\OperationTreeVerifier.cs (2)
1392public override void VisitLiteral(ILiteralOperation operation) 1394LogString(nameof(ILiteralOperation));
Compilation\TestOperationVisitor.cs (1)
976public override void VisitLiteral(ILiteralOperation operation)
Diagnostics\OperationTestAnalyzer.cs (4)
630ILiteralOperation literal = (ILiteralOperation)operationContext.Operation; 2051var literal = (ILiteralOperation)operationContext.Operation;
Microsoft.CodeAnalysis.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
378=> operand is ILiteralOperation { ConstantValue: { HasValue: true, Value: null } };
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (3)
423=> CanSimplifyToLengthEqualsZeroExpression(leftOperand, (ILiteralOperation)rightOperand), 425=> CanSimplifyToLengthEqualsZeroExpression(rightOperand, (ILiteralOperation)leftOperand), 438IOperation variableExpression, ILiteralOperation numericLiteralExpression)
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (2)
IOperation\IOperationTests.vb (2)
74Dim literal1 As ILiteralOperation = DirectCast(right1, ILiteralOperation)
System.Text.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexCodeFixer.cs (1)
290else if (argument.Value is ILiteralOperation literalOperation)