25 references to AnalyzedPattern
Microsoft.CodeAnalysis.Features (25)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.AnalyzedNodes.cs (12)
35internal sealed class AnalyzedSwitchLabel(AnalyzedPattern pattern, ImmutableArray<TExpressionSyntax> guards) 37public readonly AnalyzedPattern Pattern = pattern; 53internal sealed class Type(TIsExpressionSyntax expression) : AnalyzedPattern 61internal sealed class Source(TPatternSyntax patternSyntax) : AnalyzedPattern 69internal sealed class Constant(TExpressionSyntax expression) : AnalyzedPattern 77internal sealed class Relational(BinaryOperatorKind operatorKind, TExpressionSyntax value) : AnalyzedPattern 86internal sealed class Range(TExpressionSyntax lowerBound, TExpressionSyntax higherBound) : AnalyzedPattern 95internal sealed class And(AnalyzedPattern leftPattern, AnalyzedPattern rightPattern) : AnalyzedPattern 97public readonly AnalyzedPattern LeftPattern = leftPattern; 98public readonly AnalyzedPattern RightPattern = rightPattern;
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),