C# Класс GSF.IO.FileProcessor

Tracks files processed in a list of directories, and notifies when new files become available to be processed.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
DefaultCachePath string

Открытые методы

Метод Описание
AddTrackedDirectory ( string path ) : void

Adds a directory to the list of directories tracked by this FileProcessor.

ClearTrackedDirectories ( ) : void

Empties the list of directories tracked by this FileProcessor.

Dispose ( ) : void

Releases all the resources used by the FileProcessor object.

EnumerateWatchDirectories ( ) : void

Forces enumeration of directories currently being watched.

FileProcessor ( System.Guid processorID ) : System

Creates a new instance of the FileProcessor class.

RemoveTrackedDirectory ( string path ) : void

Removes a directory from the list of directories tracked by this FileProcessor.

StopEnumeration ( ) : void

Stops all enumeration operations that are currently running.

Приватные методы

Метод Описание
DelayAndExecute ( System.Action action, int delay ) : void
FileWatchTimer_Elapsed ( object sender, System.Timers.ElapsedEventArgs elapsedEventArgs ) : void
LoadProcessedFiles ( ) : void
MatchesFilter ( string filePath ) : bool
OnError ( Exception ex ) : void
OnProcessing ( string fullPath, bool alreadyProcessed ) : bool
ProcessFile ( string filePath ) : bool
QueueFileForProcessing ( string filePath ) : void
RemoveFileWatcher ( SafeFileWatcher watcher ) : void
StartProcessLoop ( string filePath ) : void
TouchLockAndProcess ( string filePath ) : void
Watcher_Changed ( object sender, FileSystemEventArgs args ) : void
Watcher_Created ( object sender, FileSystemEventArgs args ) : void
Watcher_Deleted ( object sender, FileSystemEventArgs args ) : void
Watcher_Error ( object sender, ErrorEventArgs args ) : void
Watcher_Renamed ( object sender, RenamedEventArgs args ) : void

Описание методов

AddTrackedDirectory() публичный Метод

Adds a directory to the list of directories tracked by this FileProcessor.
public AddTrackedDirectory ( string path ) : void
path string The path to the directory to be tracked.
Результат void

ClearTrackedDirectories() публичный Метод

Empties the list of directories tracked by this FileProcessor.
public ClearTrackedDirectories ( ) : void
Результат void

Dispose() публичный Метод

Releases all the resources used by the FileProcessor object.
public Dispose ( ) : void
Результат void

EnumerateWatchDirectories() публичный Метод

Forces enumeration of directories currently being watched.
public EnumerateWatchDirectories ( ) : void
Результат void

FileProcessor() публичный Метод

Creates a new instance of the FileProcessor class.
public FileProcessor ( System.Guid processorID ) : System
processorID System.Guid Identifies the file processor so that it can locate its processed file cache.
Результат System

RemoveTrackedDirectory() публичный Метод

Removes a directory from the list of directories tracked by this FileProcessor.
public RemoveTrackedDirectory ( string path ) : void
path string The path to the directory to stop tracking.
Результат void

StopEnumeration() публичный Метод

Stops all enumeration operations that are currently running.
public StopEnumeration ( ) : void
Результат void

Описание свойств

DefaultCachePath публичное статическое свойство

Default value for the CachePath property.
public static string DefaultCachePath
Результат string