Table of Contents

Class DatabaseWatcher

Namespace
Cuemon.Data
Assembly
Cuemon.Data.dll

Provides a watcher implementation designed to monitor and signal changes applied to a relational database by raising the Changed event.

public class DatabaseWatcher : Watcher, IWatcher, IDisposable
Inheritance
Object
DatabaseWatcher
Implements
IDisposable
Inherited Members

Constructors

DatabaseWatcher(IDbConnection, Func<IDbConnection, IDataReader>, Action<WatcherOptions>)

Initializes a new instance of the DatabaseWatcher class.

public DatabaseWatcher(IDbConnection connection, Func<IDbConnection, IDataReader> readerFactory, Action<WatcherOptions> setup = null)

Parameters

connection IDbConnection

The System.Data.IDbConnection used to connect to a database.

readerFactory Func<IDbConnection, IDataReader>

The function delegate that will resolve an implementation of an System.Data.IDataReader.

setup Action<WatcherOptions>

The WatcherOptions which may be configured.

Properties

Checksum

Gets the checksum that is associated with the query specified in ReaderFactory.

public string Checksum { get; }

Property Value

String

The checksum that is associated with the query specified in ReaderFactory.

Connection

Gets the System.Data.IDbConnection of this instance.

public IDbConnection Connection { get; }

Property Value

IDbConnection

The System.Data.IDbConnection of this instance.

ReaderFactory

Gets the function delegate that will resolve an implementation of an System.Data.IDataReader.

public Func<IDbConnection, IDataReader> ReaderFactory { get; }

Property Value

Func<IDbConnection, IDataReader>

The function delegate that will resolve an implementation of an System.Data.IDataReader.

Methods

HandleSignalingAsync()

Handles the signaling of this DatabaseWatcher.

protected override Task HandleSignalingAsync()

Returns

Task

The task object representing the asynchronous operation.

See Also