18 references to Feature
Microsoft.CodeAnalysis.Features (18)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (11)
66public Feature Features { get; } = features; 68public bool Supports(Feature feature) 281when Supports(Feature.RangePattern) && GetRangeBounds(op) is (TExpressionSyntax lower, TExpressionSyntax higher): 295when Supports(Feature.InequalityPattern): 299when Supports(Feature.RelationalPattern) && IsRelationalOperator(op.OperatorKind): 305when Supports(Feature.AndPattern | Feature.CaseGuard): 311if (Supports(Feature.AndPattern)) 322if (Supports(Feature.CaseGuard) && op.RightOperand.Syntax is TExpressionSyntax node) 332when Supports(Feature.IsTypePattern) && CheckTargetExpression(op.ValueOperand) && op.Syntax is TIsExpressionSyntax node: 336when Supports(Feature.SourcePattern) && CheckTargetExpression(op.Value) && op.Pattern.Syntax is TPatternSyntax pattern:
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (3)
57if (analyzer.Supports(Feature.SwitchExpression) && 58CanConvertToSwitchExpression(analyzer.Supports(Feature.OrPattern), sections)) 252if (convertToSwitchExpression && !CanConvertToSwitchExpression(analyzer.Supports(Feature.OrPattern), sections))
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (4)
22public abstract SyntaxNode CreateSwitchExpressionStatement(SyntaxNode target, ImmutableArray<AnalyzedSwitchSection> sections, Feature feature); 25public abstract SyntaxNode AsSwitchLabelSyntax(AnalyzedSwitchLabel label, Feature feature); 33Feature feature, 60private SyntaxNode AsSwitchSectionSyntax(AnalyzedSwitchSection section, SyntaxGenerator generator, Feature feature)