Class FileDependency
- Namespace
- Cuemon.Runtime
- Assembly
- Cuemon.Core.dll
Provides a way to monitor any changes occurred to one or more files while notifying subscribing objects.
public class FileDependency : Dependency, IDependency
- Inheritance
-
FileDependency
- Implements
- Inherited Members
Constructors
FileDependency(IEnumerable<Lazy<FileWatcher>>, Boolean)
Initializes a new instance of the FileDependency class.
public FileDependency(IEnumerable<Lazy<FileWatcher>> lazyFileWatchers, bool breakTieOnChanged = false)
Parameters
lazyFileWatchers
IEnumerable<Lazy<FileWatcher>>The FileWatcher sequence to associate with this dependency.
breakTieOnChanged
Booleanif set to
true
all FileWatcher instances is disassociated with this dependency after first notification of changed.
Remarks
The sequence of FileWatcher initializations is deferred until StartAsync() is invoked.
FileDependency(Lazy<FileWatcher>, Boolean)
Initializes a new instance of the FileDependency class.
public FileDependency(Lazy<FileWatcher> lazyFileWatcher, bool breakTieOnChanged = false)
Parameters
lazyFileWatcher
Lazy<FileWatcher>The FileWatcher to associate with this dependency.
breakTieOnChanged
Booleanif set to
true
all FileWatcher instances is disassociated with this dependency after first notification of changed.
Remarks
The FileWatcher initialization is deferred until StartAsync() is invoked.
Exceptions
- ArgumentNullException
lazyFileWatcher
cannot be null.