protected virtual void OnWriteLog(WriteLogEventArgs pArguments) { if (this.WriteLog != null) { //Invoke the event delegate WriteLog(this, pArguments); } }
protected override void ChainedWriteLog(object pSender, WriteLogEventArgs pArguments) { //A shim function to chain log events from objects here to the main application's events. this.OnWriteLog(pArguments); //Write it to the textual log file if it is > 0 if (pArguments.LogLevel > 0) { this._LogFile.WriteLogFile(pArguments.LogText); } }
/// <summary> /// Write to the log file/display. /// </summary> /// <param name="Log_Text">The text to be written.</param> /// <param name="Log_Level">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 tmpArguments = new WriteLogEventArgs(pLogText, pLogLevel); this.OnWriteLog(tmpArguments); //Write it to the textual log file if it is > 0 if (tmpArguments.LogLevel > 0) { this._LogFile.WriteLogFile(tmpArguments.LogText); } }
protected virtual void ChainedWriteLog(object sender, WriteLogEventArgs pArguments) { //A shim function to chain log events from objects here to the main application's events. this.OnWriteLog(pArguments); }
/// <summary> /// Write to the log file/display. /// </summary> /// <param name="Log_Text">The text to be written.</param> /// <param name="Log_Level">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 pArguments = new WriteLogEventArgs(pLogText, pLogLevel); this.OnWriteLog(pArguments); }