private static void RemoveBraces(CodeRefactoringContext context, SwitchSectionSyntax switchSection) { if (switchSection.ContainsSingleBlock()) { context.RegisterRefactoring( "Remove braces from switch section", cancellationToken => RemoveBracesAsync(context.Document, switchSection, cancellationToken)); } }