1 write to Labels
Microsoft.CodeAnalysis.Features (1)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.AnalyzedNodes.cs (1)
32
Labels
= labels;
15 references to Labels
Microsoft.CodeAnalysis.CSharp.Features (6)
ConvertIfToSwitch\CSharpConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (6)
40
if (section.
Labels
.IsDefault)
43
var pattern = AsPatternSyntax(section.
Labels
[0].Pattern, feature);
44
var whenClause = AsWhenClause(section.
Labels
[0]);
46
Debug.Assert(whenClause == null || section.
Labels
.Length == 1, "We shouldn't have guards when we're combining multiple cases into a single arm");
48
for (var i = 1; i < section.
Labels
.Length; i++)
50
var label = section.
Labels
[i];
Microsoft.CodeAnalysis.Features (9)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (7)
114
var labelCount = sections.Sum(section => section.
Labels
.IsDefault ? 1 : section.
Labels
.Length);
127
if (!sections.Any(static section => section.
Labels
.IsDefault))
161
if (section.
Labels
.IsDefault)
165
if (section.
Labels
.Length == 1)
168
if (section.
Labels
.Length == 0)
176
return supportsOrPattern && section.
Labels
.All(label => label.Guards.IsDefaultOrEmpty);
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (2)
63
var sectionNode = section.
Labels
.IsDefault
65
: generator.SwitchSectionFromLabels(section.
Labels
.Select(label => AsSwitchLabelSyntax(label, feature)), statements);