Example #1
0
        public override void Generate (string path) 
        {
            if (String.IsNullOrEmpty (path) || path == "-") {
                Writer = Console.Out;
            } else {
                Writer = new GeneratorWriter (File.Create (path), Encoding);
            }

            try {
                Generate ();
            }
            finally {
                Writer.Close ();
                Writer = null;
            }
        }
Example #2
0
        public void Generate(string path)
        {
            if (String.IsNullOrEmpty(path) || path == "-")
            {
                Writer = Console.Out;
            }
            else
            {
                Writer = new GeneratorWriter(File.Create(path), Encoding);
            }

            try {
                Generate();
            } finally {
                Writer.Close();
                Writer = null;
            }
        }