C# Class CmisSync.Lib.Producer.Watcher.CreatedChangedDeletedFileSystemEventHandler

Created/Changed/Deleted file system events handler to report the events to the given queue.
Inheritance: IDisposable
Exibir arquivo Open project: OpenDataSpace/CmisSync Class Usage Examples

Protected Properties

Property Type Description
timer System.Timers.Timer

Public Methods

Method Description
CreatedChangedDeletedFileSystemEventHandler ( ISyncEventQueue queue, IMetaDataStorage storage, IFileSystemInfoFactory fsFactory = null, long threshold = 100 ) : System

Initializes a new instance of the CreatedChangedDeletedFileSystemEventHandler class.

Dispose ( ) : void

Releases all resource used by the CmisSync.Lib.Producer.Watcher.CreatedChangedDeletedFileSystemEventHandler object.

Call Dispose when you are finished using the CmisSync.Lib.Producer.Watcher.CreatedChangedDeletedFileSystemEventHandler. The Dispose method leaves the CmisSync.Lib.Producer.Watcher.CreatedChangedDeletedFileSystemEventHandler in an unusable state. After calling Dispose, you must release all references to the CmisSync.Lib.Producer.Watcher.CreatedChangedDeletedFileSystemEventHandler so the garbage collector can reclaim the memory that the CmisSync.Lib.Producer.Watcher.CreatedChangedDeletedFileSystemEventHandler was occupying.

Handle ( object source, FileSystemEventArgs e ) : void

Raises the created/changed/deleted event as FSEvent.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Dispose the internal timer.

Private Methods

Method Description
AddEventToList ( FileSystemEventArgs args, System.Guid guid, bool isDirectory ) : void
PopEventsFromList ( ) : void
ResetTimerInterval ( ) : void

Method Details

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

Dispose() public method

Releases all resource used by the CmisSync.Lib.Producer.Watcher.CreatedChangedDeletedFileSystemEventHandler object.
Call Dispose when you are finished using the CmisSync.Lib.Producer.Watcher.CreatedChangedDeletedFileSystemEventHandler. The Dispose method leaves the CmisSync.Lib.Producer.Watcher.CreatedChangedDeletedFileSystemEventHandler in an unusable state. After calling Dispose, you must release all references to the CmisSync.Lib.Producer.Watcher.CreatedChangedDeletedFileSystemEventHandler so the garbage collector can reclaim the memory that the CmisSync.Lib.Producer.Watcher.CreatedChangedDeletedFileSystemEventHandler was occupying.
public Dispose ( ) : void
return void

Dispose() protected method

Dispose the internal timer.
protected Dispose ( bool disposing ) : void
disposing bool If set to true disposing.
return void

Handle() public method

Raises the created/changed/deleted event as FSEvent.
public Handle ( object source, FileSystemEventArgs e ) : void
source object /// Source file system watcher. ///
e System.IO.FileSystemEventArgs /// Reported changes. ///
return void

Property Details

timer protected_oe property

The timer. Exposed to allow testability
protected Timer,System.Timers timer
return System.Timers.Timer