13 references to AnalyzedSwitchSection
Microsoft.CodeAnalysis.Features (13)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (7)
77
public (ImmutableArray<
AnalyzedSwitchSection
>, SyntaxNode TargetExpression) AnalyzeIfStatementSequence(ReadOnlySpan<IOperation> operations)
79
using var _ = ArrayBuilder<
AnalyzedSwitchSection
>.GetInstance(out var sections);
101
private bool ParseIfStatementSequence(ReadOnlySpan<IOperation> operations, ArrayBuilder<
AnalyzedSwitchSection
> sections, out IOperation? defaultBodyOpt)
144
private bool ParseIfStatement(IOperation operation, ArrayBuilder<
AnalyzedSwitchSection
> sections, out IOperation? defaultBodyOpt)
149
var
section = ParseSwitchSection(op);
173
private bool ParseIfStatementOrBlock(IOperation op, ArrayBuilder<
AnalyzedSwitchSection
> sections, out IOperation? defaultBodyOpt)
180
private
AnalyzedSwitchSection
? ParseSwitchSection(IConditionalOperation operation)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (3)
74
[NotNullWhen(true)] out ImmutableArray<
AnalyzedSwitchSection
> sections,
123
bool supportsOrPattern, ImmutableArray<
AnalyzedSwitchSection
> sections)
153
static bool CanConvertSectionForSwitchExpression(bool supportsOrPattern,
AnalyzedSwitchSection
section)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (3)
22
public abstract SyntaxNode CreateSwitchExpressionStatement(SyntaxNode target, ImmutableArray<
AnalyzedSwitchSection
> sections, Feature feature);
32
ImmutableArray<
AnalyzedSwitchSection
> sections,
60
private SyntaxNode AsSwitchSectionSyntax(
AnalyzedSwitchSection
section, SyntaxGenerator generator, Feature feature)