Example #1
0
        //        private class SyncObject : ISynchronizeInvoke
        //        {
        //            public bool TimerStopped;
        //        }
        public IndexingJob(AbsPath absDirPath, RelPath relDirPath, List<IndexedObjects> folderList, TimerCallback callback, long dueTime, QueingThread queue)
            : base(new FsFolder<RelPath>(relDirPath), callback, dueTime, Timeout.Infinite)
        {
            _absDirPath = absDirPath;
            _queue = queue;
            _indexedObjects = new IndexedObjects(relDirPath);
            _tokenSource = new CancellationTokenSource();

            _eventQueue = new BlockingCollection<FileEvent>();
            DeletedContentList = folderList;

            _toRemove = new Queue<RelPath>();

            _startDelayTimer = new Timer();
            _startDelayTimer.Elapsed += FireDeepScan;
            _startDelayTimer.AutoReset = false;
            _startDelayTimer.Interval = FinishDelay;

            _endingTimer = new Timer();
            _endingTimer.Elapsed += Finish2;
            _endingTimer.AutoReset = false;
            _endingTimer.Interval = FinishDelay;
        }
 public TimedFolderDeletion(FsObject<RelPath> descriptor, TimerCallback callback, IndexedObjects indexedContent)
     : base(descriptor, callback, ChangeWatcher.DeleteWaitTime, Timeout.Infinite)
 {
     _indexedContent = indexedContent;
 }