public static BaseParameterListSyntax WithParameters( this BaseParameterListSyntax parameterList, SeparatedSyntaxList <ParameterSyntax> parameters) { switch (parameterList.CSharpKind()) { case SyntaxKind.BracketedParameterList: return(((BracketedParameterListSyntax)parameterList).WithParameters(parameters)); case SyntaxKind.ParameterList: return(((ParameterListSyntax)parameterList).WithParameters(parameters)); } throw Contract.Unreachable; }