/// <summary> /// Loads a logWriter to the current LogWriters collection. /// </summary> /// <param name="logWriter">The logWriter to load.</param> public void RegisterLogWriter(ILogWriter logWriter) { if (!_logWriters.Contains(logWriter)) { logWriter.PluginLoaded += LogWriter_PluginLoaded; logWriter.PluginLoadFailed += LogWriter_PluginLoadFailed; logWriter.LogWriteSuccessful += LogWriter_LogWriteSuccessful; logWriter.LogWriteFailed += LogWriter_LogWriteErrorOccurred; if (!logWriter.IsLoaded) { logWriter.Load(); } else { _logWriters.Add(logWriter); } } }