2 instantiations of AnalyzedSwitchSection
Microsoft.CodeAnalysis.Features (2)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (2)
82sections.Add(new AnalyzedSwitchSection(labels: default, defaultBodyOpt, defaultBodyOpt.Syntax)); 197return new AnalyzedSwitchSection(labels.ToImmutable(), operation.WhenTrue, operation.Syntax);
15 references to AnalyzedSwitchSection
Microsoft.CodeAnalysis.CSharp.Features (2)
ConvertIfToSwitch\CSharpConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (2)
31ExpressionSyntax target, ImmutableArray<AnalyzedSwitchSection> sections, Feature feature) 37private static SwitchExpressionArmSyntax AsSwitchExpressionArmSyntax(AnalyzedSwitchSection section, Feature feature)
Microsoft.CodeAnalysis.Features (13)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Analyzer.cs (7)
72public (ImmutableArray<AnalyzedSwitchSection>, TExpressionSyntax TargetExpression) AnalyzeIfStatementSequence(ReadOnlySpan<IOperation> operations) 74using var _ = ArrayBuilder<AnalyzedSwitchSection>.GetInstance(out var sections); 98ArrayBuilder<AnalyzedSwitchSection> sections, 153private bool ParseIfStatement(IOperation operation, ArrayBuilder<AnalyzedSwitchSection> sections, out IOperation? defaultBodyOpt) 158var section = ParseSwitchSection(op); 182private bool ParseIfStatementOrBlock(IOperation op, ArrayBuilder<AnalyzedSwitchSection> sections, out IOperation? defaultBodyOpt) 189private AnalyzedSwitchSection? ParseSwitchSection(IConditionalOperation operation)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (3)
76[NotNullWhen(true)] out ImmutableArray<AnalyzedSwitchSection> sections, 125bool supportsOrPattern, ImmutableArray<AnalyzedSwitchSection> sections) 155static bool CanConvertSectionForSwitchExpression(bool supportsOrPattern, AnalyzedSwitchSection section)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (3)
21public abstract SyntaxNode CreateSwitchExpressionStatement(TExpressionSyntax target, ImmutableArray<AnalyzedSwitchSection> sections, Feature feature); 31ImmutableArray<AnalyzedSwitchSection> sections, 58private SyntaxNode AsSwitchSectionSyntax(AnalyzedSwitchSection section, SyntaxGenerator generator, Feature feature)