Class DatabaseDependency
Provides a way to monitor any changes occurred to one or more relational data sources while notifying subscribing objects.
public class DatabaseDependency : Dependency, IDependency
- Inheritance
-
DatabaseDependency
- Implements
- Inherited Members
Constructors
DatabaseDependency(IEnumerable<Lazy<DatabaseWatcher>>, bool)
Initializes a new instance of the DatabaseDependency class.
public DatabaseDependency(IEnumerable<Lazy<DatabaseWatcher>> lazyDatabaseWatchers, bool breakTieOnChanged = false)
Parameters
lazyDatabaseWatchersIEnumerable<Lazy<DatabaseWatcher>>The DatabaseWatcher sequence to associate with this dependency.
breakTieOnChangedboolif set to
trueall DatabaseWatcher instances is disassociated with this dependency after first notification of changed.
Remarks
The sequence of DatabaseWatcher initializations is deferred until StartAsync() is invoked.
DatabaseDependency(Lazy<DatabaseWatcher>, bool)
Initializes a new instance of the DatabaseDependency class.
public DatabaseDependency(Lazy<DatabaseWatcher> lazyDatabaseWatcher, bool breakTieOnChanged = false)
Parameters
lazyDatabaseWatcherLazy<DatabaseWatcher>The DatabaseWatcher to associate with this dependency.
breakTieOnChangedboolif set to
trueall DatabaseWatcher instances is disassociated with this dependency after first notification of changed.
Remarks
The DatabaseWatcher initialization is deferred until StartAsync() is invoked.
Exceptions
- ArgumentNullException
lazyDatabaseWatchercannot be null.