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)
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),