CmisSync.Lib.Producer.Watcher.CreatedChangedDeletedFileSystemEventHandler.CreatedChangedDeletedFileSystemEventHandler C# (CSharp) Method

CreatedChangedDeletedFileSystemEventHandler() public method

Initializes a new instance of the CreatedChangedDeletedFileSystemEventHandler class.
public CreatedChangedDeletedFileSystemEventHandler ( ISyncEventQueue queue, IMetaDataStorage storage, IFileSystemInfoFactory fsFactory = null, long threshold = 100 ) : System
queue ISyncEventQueue Sync event queue.
storage IMetaDataStorage Meta data storage.
fsFactory IFileSystemInfoFactory File system info factory.
threshold long Delay after which a deleted event is passed to the queue.
return System
        public CreatedChangedDeletedFileSystemEventHandler(
            ISyncEventQueue queue,
            IMetaDataStorage storage,
            IFileSystemInfoFactory fsFactory = null,
            long threshold = 100)
        {
            if (queue == null) {
                throw new ArgumentNullException("queue");
            }

            if (storage == null) {
                throw new ArgumentNullException("storage");
            }

            this.queue = queue;
            this.storage = storage;
            this.threshold = threshold;
            this.fsFactory = fsFactory ?? new FileSystemInfoFactory();
            this.events = new List<Tuple<FileSystemEventArgs, Guid, DateTime, bool>>();
            this.timer = new Timer();
            this.timer.AutoReset = false;
            this.timer.Elapsed += (sender, e) => this.PopEventsFromList();
        }