C# 클래스 FileSystem.FileMonitor

Monitors a file for changes. It uses the FileSystemWatcher and debounce the events to make sure only one event is fired for a change of a file. Note: If a file is used in different contexts than FileMonitor will fire for each context.
상속: IFileMonitor
파일 보기 프로젝트 열기: Helmut-Ortmann/EnterpriseArchitect_hoTools 1 사용 예제들

공개 메소드들

메소드 설명
FileMonitor ( string filePath ) : System

Parameterize FileSystemWatcher

Start ( ) : void

Start Watching the file

Stop ( ) : void

Stop watching the file

Update ( string filePath ) : void

Update the fileName to watch for changes

비공개 메소드들

메소드 설명
FindReadyPaths ( DateTime>.Dictionary events ) : List

Return list of files which haven't received an change event for TIME_WITOUT_EVENT_MS.

FireEvent ( string path ) : void
OnChange ( object sender, FileSystemEventArgs e ) : void

OnChange Event from System FileSystemWatcher after file has changed. It enters all events with the last event time in the pending event list.

OnFileError ( object o, ErrorEventArgs e ) : void

Handle error from FileSystemWatcher

OnTimeout ( object state ) : void

Timeout

메소드 상세

FileMonitor() 공개 메소드

Parameterize FileSystemWatcher
public FileMonitor ( string filePath ) : System
filePath string
리턴 System

Start() 공개 메소드

Start Watching the file
public Start ( ) : void
리턴 void

Stop() 공개 메소드

Stop watching the file
public Stop ( ) : void
리턴 void

Update() 공개 메소드

Update the fileName to watch for changes
public Update ( string filePath ) : void
filePath string
리턴 void