Ejemplo n.º 1
0
 protected virtual void OnWriteLog(WriteLogEventArgs pEventArgs)
 {
     if (this.WriteLog != null)
     {
         //Invoke the event delegate
         WriteLog(this, pEventArgs);
     }
 }
Ejemplo n.º 2
0
 protected override void ChainedWriteLog(object pSender, WriteLogEventArgs pEventArgs)
 {
     //A shim function to chain log events from objects here to the main application's events.
     this.OnWriteLog(pEventArgs);
     //Write it to the textual log file if it is > 0
     if (pEventArgs.LogLevel > 0)
     {
         this._LogFile.WriteLogFile(pEventArgs.LogText);
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Write to the log file/display.
        /// </summary>
        /// <param name="pLogText">The text to be written.</param>
        /// <param name="pLogLevel">The numeric level of the log text.  In general, 0 is screen, 1 is both, 2 is file only.</param>
        protected override void WriteToLog(string pLogText, int pLogLevel)
        {
            WriteLogEventArgs tmpEventArgs = new WriteLogEventArgs(pLogText, pLogLevel);

            this.OnWriteLog(tmpEventArgs);
            //Write it to the textual log file if it is > 0
            if (tmpEventArgs.LogLevel > 0)
            {
                this._LogFile.WriteLogFile(tmpEventArgs.LogText);
            }
        }
Ejemplo n.º 4
0
 protected virtual void ChainedWriteLog(object pSender, WriteLogEventArgs pEventArgs)
 {
     //A shim function to chain log events from objects here to the main application's events.
     this.OnWriteLog(pEventArgs);
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Write to the log file/display.
        /// </summary>
        /// <param name="pLogText">The text to be written.</param>
        /// <param name="pLogLevel">The numeric level of the log text.  In general, 0 is screen, 1 is both, 2 is file only.</param>
        protected virtual void WriteToLog(string pLogText, int pLogLevel)
        {
            WriteLogEventArgs e = new WriteLogEventArgs(pLogText, pLogLevel);

            this.OnWriteLog(e);
        }