WriteLine() публичный Метод

public WriteLine ( ) : void
Результат void
        private void WriteCsOutput(TextWriter textWriter, StringsContent stringsData)
        {
            CSharpStreamWriter writer = new CSharpStreamWriter(textWriter);

            writer.WriteLine("//");
            writer.WriteLine("// This file was generated on {{0}}.", DateTime.Now);
            writer.WriteLine("//");
            writer.WriteLine();
            writer.WriteLine("using System;");
            writer.WriteLine();
            writer.WriteLine("namespace {{0}}", stringsData.Namespace);
            writer.WriteLine("{");
            writer.WriteLine("public class {{0}}", stringsData.ClassName);
            writer.WriteLine("{");
            writer.WriteLine("private string[] strings;");
            writer.WriteLine();
            writer.WriteLine("public {{0}}(string[] strings)", stringsData.ClassName);
            writer.WriteLine("{");
            writer.WriteLine("this.strings = strings;");
            writer.WriteLine("}");
            writer.WriteLine();

            for (int i = 0; i < stringsData.Strings.Count; i++)
            {
                StringsContent.String s = stringsData.Strings[i];

                if (s.ArgCount == 0)
                {
                    writer.WriteLine("public string {{0}} { get { return strings[{{1}}]; } }",
                        s.Name, i);
                }
                else
                {
                    StringBuilder sb1 = new StringBuilder();
                    StringBuilder sb2 = new StringBuilder();

                    for (int j = 0; j < s.ArgCount; j++)
                    {
                        sb1.Append("arg" + j.ToString());
                        sb2.Append("object arg" + j.ToString());

                        if (j < s.ArgCount - 1)
                        {
                            sb1.Append(", ");
                            sb2.Append(", ");
                        }
                    }

                    writer.WriteLine("public string {{0}}({{1}}) { return String.Format(strings[{{2}}], {{3}}); }",
                        s.Name, sb2.ToString(), i, sb1.ToString());
                }
            }

            writer.WriteLine("}");
            writer.WriteLine("}");
        }
        private void WriteCsOutput(TextWriter textWriter, RectanglesContent rectangleData)
        {
            CSharpStreamWriter writer = new CSharpStreamWriter(textWriter);

            writer.WriteLine("//");
            writer.WriteLine("// This file was generated on {{0}}.", DateTime.Now);
            writer.WriteLine("//");
            writer.WriteLine();
            writer.WriteLine("using System;");
            writer.WriteLine("using Microsoft.Xna.Framework;");
            writer.WriteLine("using Microsoft.Xna.Framework.Graphics;");
            writer.WriteLine("using System.Text;");
            writer.WriteLine();
            writer.WriteLine("namespace {{0}}", rectangleData.Namespace);
            writer.WriteLine("{");

            for (int i = 0; i < rectangleData.Classes.Count; i++)
            {
                RectanglesContent.Class classData = rectangleData.Classes[i];

                writer.WriteLine("public class {{0}}Rectangles", classData.ClassNamePrefix);
                writer.WriteLine("{");

                writer.WriteLine("private Rectangle[] rectangles;");
                writer.WriteLine();
                writer.WriteLine("public {{0}}Rectangles(Rectangle[] rectangles)", classData.ClassNamePrefix);
                writer.WriteLine("{");
                writer.WriteLine("this.rectangles = rectangles;");
                writer.WriteLine("}");
                writer.WriteLine();

                for (int j = 0; j < classData.RectangleNames.Count; j++)
                {
                    writer.WriteLine("public Rectangle {{0}} { get { return rectangles[{{1}}]; } }",
                                     classData.RectangleNames[j],
                                     j);
                }

                writer.WriteLine("}");
            }

            writer.WriteLine("public static class Rectangles");
            writer.WriteLine("{");

            for (int i = 0; i < rectangleData.Classes.Count; i++)
            {
                writer.WriteLine("public static {{0}}Rectangles {{0}} { get; set; }", rectangleData.Classes[i].ClassNamePrefix);
            }

            writer.WriteLine("}");
            writer.WriteLine("}");
        }
        private void WriteCsOutput(TextWriter textWriter, StringsContent stringsData)
        {
            CSharpStreamWriter writer = new CSharpStreamWriter(textWriter);

            writer.WriteLine("//");
            writer.WriteLine("// This file was generated on {{0}}.", DateTime.Now);
            writer.WriteLine("//");
            writer.WriteLine();
            writer.WriteLine("using System;");
            writer.WriteLine();
            writer.WriteLine("namespace {{0}}", stringsData.Namespace);
            writer.WriteLine("{");
            writer.WriteLine("public class {{0}}", stringsData.ClassName);
            writer.WriteLine("{");
            writer.WriteLine("private string[] strings;");
            writer.WriteLine();
            writer.WriteLine("public {{0}}(string[] strings)", stringsData.ClassName);
            writer.WriteLine("{");
            writer.WriteLine("this.strings = strings;");
            writer.WriteLine("}");
            writer.WriteLine();

            for (int i = 0; i < stringsData.Strings.Count; i++)
            {
                StringsContent.String s = stringsData.Strings[i];

                if (s.ArgCount == 0)
                {
                    writer.WriteLine("public string {{0}} { get { return strings[{{1}}]; } }",
                                     s.Name, i);
                }
                else
                {
                    StringBuilder sb1 = new StringBuilder();
                    StringBuilder sb2 = new StringBuilder();

                    for (int j = 0; j < s.ArgCount; j++)
                    {
                        sb1.Append("arg" + j.ToString());
                        sb2.Append("object arg" + j.ToString());

                        if (j < s.ArgCount - 1)
                        {
                            sb1.Append(", ");
                            sb2.Append(", ");
                        }
                    }

                    writer.WriteLine("public string {{0}}({{1}}) { return String.Format(strings[{{2}}], {{3}}); }",
                                     s.Name, sb2.ToString(), i, sb1.ToString());
                }
            }

            writer.WriteLine("}");
            writer.WriteLine("}");
        }