public bool RemoveListener(ILogTableListener listener)
 {
     lock (_syncRoot)
     {
         return _notifiers.Remove(listener);
     }
 }
 public bool RemoveListener(ILogTableListener listener)
 {
     lock (_syncRoot)
     {
         return(_notifiers.Remove(listener));
     }
 }
 public void AddListener(ILogTableListener listener, TimeSpan maximumWaitTime, int maximumLineCount)
 {
     lock (_syncRoot)
     {
         var notifier = new LogFileListenerNotifier(_logTable, listener, maximumWaitTime, maximumLineCount);
         _notifiers.Add(listener, notifier);
     }
 }
        public LogFileListenerNotifier(ILogTable logTable, ILogTableListener listener, TimeSpan maximumWaitTime,
		                               int maximumLineCount)
        {
            if (logTable == null)
                throw new ArgumentNullException("logTable");

            _logTable = logTable;
            _listener = listener;
            _maximumWaitTime = maximumWaitTime;
            _maximumLineCount = maximumLineCount;
        }
 public void AddListener(ILogTableListener listener, TimeSpan maximumWaitTime, int maximumLineCount)
 {
     lock (_syncRoot)
     {
         if (!_notifiers.ContainsKey(listener))
         {
             var notifier = new LogTableListenerNotifier(_logTable, listener, maximumWaitTime, maximumLineCount);
             _notifiers.Add(listener, notifier);
             notifier.OnRead(_currentEntryIndex);
         }
     }
 }
        public LogTableListenerNotifier(ILogTable logTable,
                                        ILogTableListener listener,
                                        TimeSpan maximumTime,
                                        int maximumCount)
        {
            if (logTable == null)
            {
                throw new ArgumentNullException(nameof(logTable));
            }

            _logTable     = logTable;
            _listener     = listener;
            _maximumTime  = maximumTime;
            _maximumCount = maximumCount;

            Reset();

            _listener.OnLogTableModified(logTable, LogTableModification.Reset);
        }
Пример #7
0
 /// <inheritdoc />
 public bool RemoveListener(ILogTableListener listener)
 {
     return(_listeners.RemoveListener(listener));
 }
Пример #8
0
 /// <inheritdoc />
 public void AddListener(ILogTableListener listener, TimeSpan maximumWaitTime, int maximumLineCount)
 {
     _listeners.AddListener(listener, maximumWaitTime, maximumLineCount);
 }
Пример #9
0
 public bool RemoveListener(ILogTableListener listener)
 {
     throw new NotImplementedException();
 }
Пример #10
0
 public void AddListener(ILogTableListener listener, TimeSpan maximumWaitTime, int maximumLineCount)
 {
     throw new NotImplementedException();
 }
Пример #11
0
 /// <inheritdoc />
 public bool RemoveListener(ILogTableListener listener)
 {
     throw new NotImplementedException();
 }
Пример #12
0
 /// <inheritdoc />
 public void AddListener(ILogTableListener listener, TimeSpan maximumWaitTime, int maximumLineCount)
 {
     throw new NotImplementedException();
 }
Пример #13
0
 public void AddListener(ILogTableListener listener, TimeSpan maximumWaitTime, int maximumLineCount)
 {
     _listeners.AddListener(listener, maximumWaitTime, maximumLineCount);
 }
Пример #14
0
 public bool RemoveListener(ILogTableListener listener)
 {
     return _listeners.RemoveListener(listener);
 }