public override void VisitConstructorDeclaration(ConstructorDeclarationSyntax node)
{
cb.AppendIndent()
.Append(node.Identifier.ToString())
.Append("::")
.Append(node.Identifier.ToString())
.Append("(");
if (node.ParameterList != null)
{
var pars = node.ParameterList.Parameters.ToList();
for (int i = 0; i < pars.Count; ++i)
{
var p = pars[i];
var z = model.GetDeclaredSymbol(p);
cb.Append(ArgumentTypeFor(z.Type))
.Append(" ")
.Append(p.Identifier.Text);
if (i + 1 != pars.Count)
cb.Append(", ");
}
}
cb.Append(")");
var parent = node.Parent as ClassDeclarationSyntax;
if (parent != null && parent.HasInitializableMembers(model))
{
cb.AppendLine(" :");
cb.Indent(() => AppendFieldInitializers(parent));
}
else
{
cb.AppendLine();
}
cb.AppendLineWithIndent("{");
cb.Indent(() => base.VisitConstructorDeclaration(node));
cb.AppendLineWithIndent("}");
}