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

            logger.LogMessageAriseAction += OnLogMessageArise;
            LoggersChangedAction?.Invoke();
        }