ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (13)
230var pattern = ParsePattern(operation, guards);
276private AnalyzedPattern? ParsePattern(IOperation operation, ArrayBuilder<TExpressionSyntax> guards)
282return new AnalyzedPattern.Range(lower, higher);
288=> new AnalyzedPattern.Constant(left),
290=> new AnalyzedPattern.Constant(right),
307var leftPattern = ParsePattern(op.LeftOperand, guards);
314var rightPattern = ParsePattern(op.RightOperand, guards);
316return new AnalyzedPattern.And(leftPattern, rightPattern);
333return new AnalyzedPattern.Type(node);
337return new AnalyzedPattern.Source(pattern);
346private AnalyzedPattern? ParseRelationalPattern(IBinaryOperation op)
351=> new AnalyzedPattern.Relational(Flip(op.OperatorKind), left),
353=> new AnalyzedPattern.Relational(op.OperatorKind, right),