9 references to Labels
Microsoft.CodeAnalysis.Features (9)
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (7)
113
var labelCount = sections.Sum(section => section.
Labels
.IsDefault ? 1 : section.
Labels
.Length);
126
if (!sections.Any(static section => section.
Labels
.IsDefault))
160
if (section.
Labels
.IsDefault)
164
if (section.
Labels
.Length == 1)
167
if (section.
Labels
.Length == 0)
175
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);