ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (13)
222var pattern = ParsePattern(operation, guards);
268private AnalyzedPattern? ParsePattern(IOperation operation, ArrayBuilder<TExpressionSyntax> guards)
274return new AnalyzedPattern.Range(lower, higher);
280=> new AnalyzedPattern.Constant(left),
282=> new AnalyzedPattern.Constant(right),
299var leftPattern = ParsePattern(op.LeftOperand, guards);
306var rightPattern = ParsePattern(op.RightOperand, guards);
308return new AnalyzedPattern.And(leftPattern, rightPattern);
325return new AnalyzedPattern.Type(node);
329return new AnalyzedPattern.Source(pattern);
338private AnalyzedPattern? ParseRelationalPattern(IBinaryOperation op)
343=> new AnalyzedPattern.Relational(Flip(op.OperatorKind), left),
345=> new AnalyzedPattern.Relational(op.OperatorKind, right),