Beispiel #1
0
 public void Update()
 {
     eventParamsQueMutex = true;
     while (eventParamsQue.Count > 0)
     {
         evtParams = eventParamsQue.Dequeue() as IHandlerEvent;
         if (evtParams != null)
         {
             evtParams.HandlerEvent();
             evtParams = null;
         }
     }
     eventParamsQueMutex = false;
 }
Beispiel #2
0
        public WatcherLogic(DirectoryInfo path, IHandlerEvent handler, List <string> listlog)
        {
            if (path == null || listlog == null)
            {
                throw new ArgumentNullException("Argumet cannot null");
            }
            if (listlog.Count() > 0)
            {
                throw new ArgumentException("Cannot be greater than zero");
            }

            _handlerEvent = handler;

            _rootFolder = path;

            _logList = listlog;

            _backupLogic = DependenciesResolver.BackupLogic;
        }