1 implementation of ISwitchOperation
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
4111internal sealed partial class SwitchOperation : Operation, ISwitchOperation
49 references to ISwitchOperation
Microsoft.CodeAnalysis (6)
Generated\OperationKind.Generated.cs (1)
25/// <summary>Indicates an <see cref="ISwitchOperation"/>.</summary>
Generated\Operations.Generated.cs (3)
10806public override IOperation VisitSwitch(ISwitchOperation operation, object? argument) 11418public virtual void VisitSwitch(ISwitchOperation operation) => DefaultVisit(operation); 11557public virtual TResult? VisitSwitch(ISwitchOperation operation, TArgument argument) => DefaultVisit(operation, argument);
Operations\ControlFlowGraphBuilder.cs (1)
5462public override IOperation? VisitSwitch(ISwitchOperation operation, int? captureIdForResult)
Operations\OperationExtensions.cs (1)
380case ISwitchOperation correspondingSwitch when operation.Target.Equals(correspondingSwitch.ExitLabel):
Microsoft.CodeAnalysis.CodeStyle (12)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchStatementDiagnosticAnalyzer.cs (7)
12AbstractPopulateSwitchDiagnosticAnalyzer<ISwitchOperation, TSwitchSyntax> 23protected override IOperation GetValueOfSwitchOperation(ISwitchOperation operation) 26protected sealed override bool IsSwitchTypeUnknown(ISwitchOperation operation) 29protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchOperation operation) 32protected sealed override bool HasDefaultCase(ISwitchOperation operation) 35protected override bool HasExhaustiveNullAndTypeCheckCases(ISwitchOperation operation) 41protected override bool HasConstantCase(ISwitchOperation operation, object? value)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (5)
17public static bool HasDefaultCase(ISwitchOperation switchStatement) 55public static ICollection<ISymbol> GetMissingEnumMembers(ISwitchOperation switchStatement) 80public static bool HasNullSwitchArm(ISwitchOperation operation) 97private static bool TryRemoveExistingEnumMembers(ISwitchOperation switchStatement, Dictionary<long, ISymbol> enumValues) 183public static bool HasExhaustiveNullAndTypeCheckCases(ISwitchOperation operation)
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (6)
20ISwitchOperation, TSwitchSyntax, TSwitchArmSyntax, TMemberAccessExpression> 34TSwitchSyntax switchNode, ISwitchOperation switchOperation) 59protected sealed override ITypeSymbol GetSwitchType(ISwitchOperation switchOperation) 62protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchOperation switchOperation) 65protected sealed override bool HasNullSwitchArm(ISwitchOperation switchOperation) 80protected sealed override int InsertPosition(ISwitchOperation switchStatement)
Microsoft.CodeAnalysis.CSharp (1)
Operations\CSharpOperationFactory.cs (1)
2684private ISwitchOperation CreateBoundSwitchStatementOperation(BoundSwitchStatement boundSwitchStatement)
Microsoft.CodeAnalysis.Features (18)
src\Analyzers\Core\Analyzers\PopulateSwitch\AbstractPopulateSwitchStatementDiagnosticAnalyzer.cs (7)
12AbstractPopulateSwitchDiagnosticAnalyzer<ISwitchOperation, TSwitchSyntax> 23protected override IOperation GetValueOfSwitchOperation(ISwitchOperation operation) 26protected sealed override bool IsSwitchTypeUnknown(ISwitchOperation operation) 29protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchOperation operation) 32protected sealed override bool HasDefaultCase(ISwitchOperation operation) 35protected override bool HasExhaustiveNullAndTypeCheckCases(ISwitchOperation operation) 41protected override bool HasConstantCase(ISwitchOperation operation, object? value)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (5)
17public static bool HasDefaultCase(ISwitchOperation switchStatement) 55public static ICollection<ISymbol> GetMissingEnumMembers(ISwitchOperation switchStatement) 80public static bool HasNullSwitchArm(ISwitchOperation operation) 97private static bool TryRemoveExistingEnumMembers(ISwitchOperation switchStatement, Dictionary<long, ISymbol> enumValues) 183public static bool HasExhaustiveNullAndTypeCheckCases(ISwitchOperation operation)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (6)
20ISwitchOperation, TSwitchSyntax, TSwitchArmSyntax, TMemberAccessExpression> 34TSwitchSyntax switchNode, ISwitchOperation switchOperation) 59protected sealed override ITypeSymbol GetSwitchType(ISwitchOperation switchOperation) 62protected sealed override ICollection<ISymbol> GetMissingEnumMembers(ISwitchOperation switchOperation) 65protected sealed override bool HasNullSwitchArm(ISwitchOperation switchOperation) 80protected sealed override int InsertPosition(ISwitchOperation switchStatement)
Microsoft.CodeAnalysis.Test.Utilities (5)
Compilation\OperationTreeVerifier.cs (2)
516public override void VisitSwitch(ISwitchOperation operation) 520LogString($"{nameof(ISwitchOperation)} ({caseCountStr}{exitLabelStr})");
Compilation\TestOperationVisitor.cs (1)
160public override void VisitSwitch(ISwitchOperation operation)
Diagnostics\OperationTestAnalyzer.cs (2)
338ISwitchOperation switchOperation = (ISwitchOperation)operationContext.Operation;
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (1)
IOperation\IOperationTests_IBranchOperation.Extensions.vb (1)
321Assert.IsAssignableFrom(GetType(ISwitchOperation), result.outer)