示例#1
0
        public void Append(IError error)
        {
            if (error.Level >= this.ReportLevel)
            {
                // format the error according to layout
                string formated = ErrorFormater.Format(this.Layout, error);

                // print on the console
                Console.WriteLine(formated);
                this.AppendedCount++;
            }
        }
示例#2
0
        public Debugger(bool IsAsynchronous)
        {
            _textWriter    = File.CreateText(filePath);
            _ErrorFormater = ErrorFormater.GetDefaultInstance();

            if (IsAsynchronous)
            {
                //initialize queue
                _debuggerQueue = new DebuggerQueue(_textWriter, _ErrorFormater);

                _debuggerQueue.MaxTaskCount = 1;
                _debuggerQueue.Name         = "Debugger Queue";
                _debuggerQueue.Debugger     = this;
                _debuggerQueue.Start();

                //set queueInitialized to ture
                _queueInitialized = true;
            }
            else
            {
                _queueInitialized = false;
            }
        }
示例#3
0
        public Debugger(bool IsAsynchronous)
        {
            _textWriter = File.CreateText(filePath);
            _ErrorFormater = ErrorFormater.GetDefaultInstance();

            if (IsAsynchronous)
            {
                //initialize queue
                _debuggerQueue = new DebuggerQueue(_textWriter, _ErrorFormater);

                _debuggerQueue.MaxTaskCount = 1;
                _debuggerQueue.Name = "Debugger Queue";
                _debuggerQueue.Debugger = this;
                _debuggerQueue.Start();

                //set queueInitialized to ture
                _queueInitialized = true;
            }
            else
            {
                _queueInitialized = false;
            }
        }
示例#4
0
 public DebuggerQueue(TextWriter textWriter)
 {
     this._ErrorFormater = ErrorFormater.GetDefaultInstance();
     this._textWriter    = textWriter;
 }
示例#5
0
 public DebuggerQueue(TextWriter textWriter, ErrorFormater errorFormater)
 {
     this._ErrorFormater = errorFormater;
     this._textWriter    = textWriter;
 }