示例#1
0
        /// <summary>
        /// Calls each parser:
        /// <see cref="ParseLevel1Pre()" />,
        /// <see cref="ParseLevel1()" />.
        /// <see cref="ParseLevel2()" />.
        /// <see cref="ParseLevel3()" />
        /// and prints some info to logger or debug.
        /// </summary>
        public void Parse()
        {
            this.ParseLevel1Pre();
            this.ParseLevel1();
            this.ParseLevel2();
            this.isParsed2 = true;
            this.ParseLevel3();
            this.isParsed3 = true;
            this.ParseLevel4();
            if (this.parserOptions.CleanAfterParse)
            {
                this.Defs.Clean(/*this.ParserOptions*/);
            }
            this.isParsed2 = true;
                        #if DEBUG
            System.Diagnostics.Debug.Print("---- some info ----");
            System.Diagnostics.Debug.Print("——————————————————————————————————");
            System.Diagnostics.Debug.Print(this.PrintInfoLevel1());
            System.Diagnostics.Debug.Print("——————————————————————————————————");
                        #else
            XLog.WriteLine("---- some info ----");
            XLog.WriteLine("——————————————————————————————————");
            XLog.WriteLine(this.PrintInfoLevel1());
            XLog.WriteLine("——————————————————————————————————");
                        #endif
//			this.ParseDefinitions();
        }
示例#2
0
 public void Print(string format, params object[] output)
 {
     if (OutputMode == XLog.OutputMode.Console)
     {
         Console.WriteLine(format, output);
     }
     else if (OutputMode == XLog.OutputMode.Debugger)
     {
         System.Diagnostics.Debug.Print(format, output);
     }
     else
     {
         XLog.WriteLine(format, output);
     }
 }