public void DeleteLogger(IDeviceLogger logger) { _deviceLoggers.Remove(logger); if (logger?.LogMessageAriseAction != null) { logger.LogMessageAriseAction -= OnLogMessageArise; } LoggersChangedAction?.Invoke(); }
public void AddLogger(IDeviceLogger logger, string subjectName) { logger.SetLoggerSubject(subjectName); if (_deviceLoggers.Contains(logger)) { return; } _deviceLoggers.Add(logger); logger.LogMessageAriseAction += OnLogMessageArise; LoggersChangedAction?.Invoke(); }