FileGenerator.Drawables.PathsGenerator.WritePath C# (CSharp) Method

WritePath() private method

private WritePath ( ConstructorInfo constructor ) : void
constructor System.Reflection.ConstructorInfo
return void
    private void WritePath(ConstructorInfo constructor)
    {
      var name = constructor.DeclaringType.Name.Substring(4);
      var parameters = constructor.GetParameters();

      foreach (string commentLine in Types.GetCommentLines(constructor))
        WriteLine(commentLine);
      Write("public Paths " + name + "(");
      WriteParameterDeclaration(parameters);
      WriteLine(")");
      WriteStartColon();
      Write("_Paths.Add(new " + constructor.DeclaringType.Name + "(");
      WriteParameters(parameters);
      WriteLine("));");
      WriteLine("return this;");
      WriteEndColon();
      WriteLine();
    }