public static VariableDeclarationTranslationUnit Create(
ITranslationUnit type, ITranslationUnit[] names, ITranslationUnit[] expressions = null,
bool shouldRenderDeclarationKeyword = true)
{
if (names == null)
{
throw new ArgumentNullException(nameof(names));
}
if (names.Length == 0)
{
throw new ArgumentException(nameof(names), "At least one name needed!");
}
if (expressions != null && expressions.Length != names.Length)
{
throw new ArgumentException(nameof(expressions), "Number of expressions should match number of names!");
}
return new VariableDeclarationTranslationUnit()
{
names = names,
type = type,
expressions = expressions,
shouldRenderDeclarationKeyword = shouldRenderDeclarationKeyword
};
}