1 implementation of ISwitchExpressionOperation
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
9315internal sealed partial class SwitchExpressionOperation : Operation, ISwitchExpressionOperation
47 references to ISwitchExpressionOperation
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
ActualApiResponseMetadataFactory.cs (1)
102if (returnedValue is ISwitchExpressionOperation switchExpression)
Microsoft.CodeAnalysis (5)
Generated\OperationKind.Generated.cs (1)
240/// <summary>Indicates an <see cref="ISwitchExpressionOperation"/>.</summary>
Generated\Operations.Generated.cs (3)
11271public override IOperation VisitSwitchExpression(ISwitchExpressionOperation operation, object? argument) 11521public virtual void VisitSwitchExpression(ISwitchExpressionOperation operation) => DefaultVisit(operation); 11660public virtual TResult? VisitSwitchExpression(ISwitchExpressionOperation operation, TArgument argument) => DefaultVisit(operation, argument);
Operations\ControlFlowGraphBuilder.cs (1)
7717public override IOperation VisitSwitchExpression(ISwitchExpressionOperation operation, int? captureIdForResult)
Microsoft.CodeAnalysis.CodeStyle (12)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchExpressionDiagnosticAnalyzer.cs (7)
12AbstractPopulateSwitchDiagnosticAnalyzer<ISwitchExpressionOperation, TSwitchSyntax> 23protected override IOperation GetValueOfSwitchOperation(ISwitchExpressionOperation operation) 26protected override bool IsSwitchTypeUnknown(ISwitchExpressionOperation operation) 29protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchExpressionOperation operation) 32protected sealed override bool HasDefaultCase(ISwitchExpressionOperation operation) 35protected override bool HasExhaustiveNullAndTypeCheckCases(ISwitchExpressionOperation operation) 38protected override bool HasConstantCase(ISwitchExpressionOperation operation, object? value)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchExpressionHelpers.cs (5)
16public static ICollection<ISymbol> GetMissingEnumMembers(ISwitchExpressionOperation operation) 40public static bool HasNullSwitchArm(ISwitchExpressionOperation operation) 52ISwitchExpressionOperation operation, Dictionary<long, ISymbol> enumMembers) 82public static bool HasDefaultCase(ISwitchExpressionOperation operation) 106public static bool HasExhaustiveNullAndTypeCheckCases(ISwitchExpressionOperation operation)
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchExpressionCodeFixProvider.cs (6)
18ISwitchExpressionOperation, TSwitchSyntax, TSwitchArmSyntax, TMemberAccessExpressionSyntax> 33TSwitchSyntax switchNode, ISwitchExpressionOperation switchExpression) 43protected sealed override ITypeSymbol GetSwitchType(ISwitchExpressionOperation switchExpression) 46protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchExpressionOperation switchOperation) 49protected override bool HasNullSwitchArm(ISwitchExpressionOperation switchOperation) 55protected sealed override int InsertPosition(ISwitchExpressionOperation switchExpression)
Microsoft.CodeAnalysis.CSharp (1)
Operations\CSharpOperationFactory.cs (1)
2704private ISwitchExpressionOperation CreateBoundSwitchExpressionOperation(BoundConvertedSwitchExpression boundSwitchExpression)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
427case ISwitchExpressionOperation _:
Microsoft.CodeAnalysis.Features (18)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchExpressionDiagnosticAnalyzer.cs (7)
12AbstractPopulateSwitchDiagnosticAnalyzer<ISwitchExpressionOperation, TSwitchSyntax> 23protected override IOperation GetValueOfSwitchOperation(ISwitchExpressionOperation operation) 26protected override bool IsSwitchTypeUnknown(ISwitchExpressionOperation operation) 29protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchExpressionOperation operation) 32protected sealed override bool HasDefaultCase(ISwitchExpressionOperation operation) 35protected override bool HasExhaustiveNullAndTypeCheckCases(ISwitchExpressionOperation operation) 38protected override bool HasConstantCase(ISwitchExpressionOperation operation, object? value)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchExpressionHelpers.cs (5)
16public static ICollection<ISymbol> GetMissingEnumMembers(ISwitchExpressionOperation operation) 40public static bool HasNullSwitchArm(ISwitchExpressionOperation operation) 52ISwitchExpressionOperation operation, Dictionary<long, ISymbol> enumMembers) 82public static bool HasDefaultCase(ISwitchExpressionOperation operation) 106public static bool HasExhaustiveNullAndTypeCheckCases(ISwitchExpressionOperation operation)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchExpressionCodeFixProvider.cs (6)
18ISwitchExpressionOperation, TSwitchSyntax, TSwitchArmSyntax, TMemberAccessExpressionSyntax> 33TSwitchSyntax switchNode, ISwitchExpressionOperation switchExpression) 43protected sealed override ITypeSymbol GetSwitchType(ISwitchExpressionOperation switchExpression) 46protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchExpressionOperation switchOperation) 49protected override bool HasNullSwitchArm(ISwitchExpressionOperation switchOperation) 55protected sealed override int InsertPosition(ISwitchExpressionOperation switchExpression)
Microsoft.CodeAnalysis.Test.Utilities (3)
Compilation\OperationTreeVerifier.cs (2)
2124public override void VisitSwitchExpression(ISwitchExpressionOperation operation) 2126LogString($"{nameof(ISwitchExpressionOperation)} ({operation.Arms.Length} arms, IsExhaustive: {operation.IsExhaustive})");
Compilation\TestOperationVisitor.cs (1)
1545public override void VisitSwitchExpression(ISwitchExpressionOperation operation)