/// <inheritdoc/> public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration) { bool isStatic = (constructorDeclaration.Modifiers & Modifiers.Static) != 0; TypeDeclaration type = constructorDeclaration.Parent as TypeDeclaration; String name = null; if (type != null && type.Name != constructorDeclaration.Name) { name = type.NameToken.Name; } else { name = constructorDeclaration.NameToken.Name; } Formatter.AppendIndented(String.Empty); if (!isStatic) { IType type2 = constructorDeclaration.GetResolveResult().Type; WriteMethodHeader(name, constructorDeclaration.Parameters); Formatter.AppendLine(";"); } else { Formatter.Append("static Boolean "); Formatter.AppendName(name); Formatter.AppendLine("_Static();"); Formatter.AppendIndented("static Boolean "); Formatter.AppendName(name); Formatter.AppendLine("_Initilized;"); } HadConstructor = true; if (constructorDeclaration.Parameters.Count == 0) { HadDefaultConstructor = true; } }
/// <inheritdoc/> public override void VisitVariableInitializer(VariableInitializer variableInitializer) { Formatter.AppendName(variableInitializer.Name); }
/// <inheritdoc/> protected override void WriteMethodHeader(String methodName, AstNodeCollection <ParameterDeclaration> parameters) { Formatter.AppendName(methodName); WriteCommaSeparatedListInParenthesis(parameters); }