Class DataWatcher
A Watcher implementation, that can monitor and signal changes of one or more data locations by raising the Changed event.
Implements
Inherited Members
Namespace: Cuemon.Data
Assembly: Cuemon.Data.dll
Syntax
public sealed class DataWatcher : Watcher, IDisposable
Constructors
| Improve this DocDataWatcher(DataManager, IDataCommand, DbParameter[])
Initializes a new instance of the DataWatcher class.
Declaration
public DataWatcher(DataManager manager, IDataCommand command, params DbParameter[] parameters)
Parameters
Type | Name | Description |
---|---|---|
DataManager | manager | The DataManager to be used for the underlying data operations. |
IDataCommand | command | The IDataCommand to execute and monitor for changes. |
System.Data.Common.DbParameter[] | parameters | An optional sequence of System.Data.Common.DbParameter to use with the associated |
Remarks
Monitors the provided command
for changes in an interval of two minutes using a MD5 hash check on the query result. The signaling is default delayed 15 seconds before first invoke.
DataWatcher(DataManager, IDataCommand, TimeSpan, DbParameter[])
Initializes a new instance of the DataWatcher class.
Declaration
public DataWatcher(DataManager manager, IDataCommand command, TimeSpan period, params DbParameter[] parameters)
Parameters
Type | Name | Description |
---|---|---|
DataManager | manager | The DataManager to be used for the underlying data operations. |
IDataCommand | command | The IDataCommand to execute and monitor for changes. |
System.TimeSpan | period | The time interval between periodic signaling for changes of the provided |
System.Data.Common.DbParameter[] | parameters | An optional array of System.Data.Common.DbParameter to use with the associated |
Remarks
Monitors the provided command
for changes in an interval specified by period
using a MD5 hash check on the query result. The signaling is default delayed 15 seconds before first invoke.
DataWatcher(DataManager, IDataCommand, TimeSpan, TimeSpan, TimeSpan, DbParameter[])
Initializes a new instance of the DataWatcher class.
Declaration
public DataWatcher(DataManager manager, IDataCommand command, TimeSpan dueTime, TimeSpan period, TimeSpan dueTimeOnChanged, params DbParameter[] parameters)
Parameters
Type | Name | Description |
---|---|---|
DataManager | manager | The DataManager to be used for the underlying data operations. |
IDataCommand | command | The IDataCommand to execute and monitor for changes. |
System.TimeSpan | dueTime | The amount of time to delay before the associated Watcher starts signaling. Specify negative one (-1) milliseconds to prevent the signaling from starting. Specify zero (0) to start the signaling immediately. |
System.TimeSpan | period | The time interval between periodic signaling for changes of the provided |
System.TimeSpan | dueTimeOnChanged | The amount of time to postpone a Changed event. Specify zero (0) to disable postponing. |
System.Data.Common.DbParameter[] | parameters | An optional array of System.Data.Common.DbParameter to use with the associated |
Remarks
Monitors the provided command
for changes in an interval specified by period
using a MD5 hash check on the query result.
Properties
| Improve this DocCommand
Gets the associated IDataCommand of this DataWatcher.
Declaration
public IDataCommand Command { get; }
Property Value
Type | Description |
---|---|
IDataCommand | The associated IDataCommand of this DataWatcher. |
Manager
Gets the associated DataManager of this DataWatcher.
Declaration
public DataManager Manager { get; }
Property Value
Type | Description |
---|---|
DataManager | The associated DataManager of this DataWatcher. |
Parameters
Gets the associated array of System.Data.Common.DbParameter of this DataWatcher.
Declaration
public DbParameter[] Parameters { get; }
Property Value
Type | Description |
---|---|
System.Data.Common.DbParameter[] | The associated array of System.Data.Common.DbParameter of this DataWatcher. |
Methods
| Improve this DocHandleSignaling()
Handles the signaling of this DataWatcher.
Declaration
protected override void HandleSignaling()