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