Exemplo n.º 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++;
            }
        }
Exemplo n.º 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;
            }
        }
Exemplo n.º 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;
            }
        }
Exemplo n.º 4
0
 public DebuggerQueue(TextWriter textWriter)
 {
     this._ErrorFormater = ErrorFormater.GetDefaultInstance();
     this._textWriter    = textWriter;
 }
Exemplo n.º 5
0
 public DebuggerQueue(TextWriter textWriter, ErrorFormater errorFormater)
 {
     this._ErrorFormater = errorFormater;
     this._textWriter    = textWriter;
 }