示例#1
0
        public override string ToString()
        {
            StringBuilderFormatter formatter = new StringBuilderFormatter();

            Write(formatter, false);
            return(formatter.ToString());
        }
示例#2
0
        public string Transpile(string prologue, string epilogue, bool comment)
        {
            StringBuilderFormatter formatter = new StringBuilderFormatter();

            if (prologue != null)
            {
                formatter.WriteLine(prologue);
            }
            foreach (var @namespace in Namespaces)
            {
                @namespace.Write(formatter, comment);
            }
            if (epilogue != null)
            {
                formatter.WriteLine(epilogue);
            }
            return(formatter.ToString());
        }