private static SyntaxRemoveOptions GetRemoveOptions(CaseSwitchLabelSyntax label) { if (label.GetLeadingTrivia().IsEmptyOrWhitespace() && label.GetTrailingTrivia().IsEmptyOrWhitespace()) { return(SyntaxRemoveOptions.KeepNoTrivia); } return(SyntaxRemoveOptions.KeepExteriorTrivia); }
private static SyntaxRemoveOptions GetRemoveOptions(CaseSwitchLabelSyntax label) { if (label.GetLeadingTrivia().All(f => f.IsWhitespaceOrEndOfLineTrivia()) && label.GetTrailingTrivia().All(f => f.IsWhitespaceOrEndOfLineTrivia())) { return(SyntaxRemoveOptions.KeepNoTrivia); } return(SyntaxRemoveOptions.KeepExteriorTrivia); }