public CSharpSyntaxNode Convert(CaseClause node) { SwitchSectionSyntax csSwitchSection = SyntaxFactory.SwitchSection(); csSwitchSection = csSwitchSection.AddLabels(SyntaxFactory.CaseSwitchLabel(node.Expression.ToCsNode <ExpressionSyntax>())); csSwitchSection = csSwitchSection.AddStatements(node.Statements.ToCsNodes <StatementSyntax>()); return(csSwitchSection); }
public CSharpSyntaxNode Convert(DefaultClause node) { SwitchSectionSyntax csSwitchSection = SyntaxFactory.SwitchSection(); csSwitchSection = csSwitchSection.AddLabels(SyntaxFactory.DefaultSwitchLabel()); csSwitchSection = csSwitchSection.AddStatements(node.Statements.ToCsNodes <StatementSyntax>()); return(csSwitchSection); }