Watcher Class
Definition
Represents the base class from which all implementations of resource monitoring should derive.
public abstract class Watcher : Disposable, IWatcher, IDisposable
- Inheritance
-
Watcher
- Implements
- Derived
- Inherited Members
Constructors
| Name | Description |
|---|---|
| Watcher(Action<WatcherOptions>) | Initializes a new instance of the Watcher class. |
Properties
| Name | Description |
|---|---|
| DueTime | Gets or sets the TimeSpan representing the amount of time to delay before the Watcher starts signaling. |
| DueTimeOnChanged | Gets the amount of time to postpone a Changed event. |
| Period | Gets the time interval between periodic signaling. |
| UtcLastModified | Gets the time when the resource being monitored was last changed. |
| UtcLastSignaled | Gets the time when the last signaling occurred. |
Methods
| Name | Description |
|---|---|
| ChangeSignaling(TimeSpan) | Changes the signaling timer of the Watcher. |
| ChangeSignaling(TimeSpan, TimeSpan) | Changes the signaling timer of the Watcher. |
| HandleSignaling() | Handles the signaling of this Watcher. |
| HandleSignalingAsync() | Handles the signaling of this Watcher. |
| OnChangedRaised() | Raises the Changed event. |
| OnChangedRaised(WatcherEventArgs) | Raises the Changed event. |
| OnDisposeManagedResources() | Called when this object is being disposed by either Dispose() or Dispose(bool) having |
| OnDisposeUnmanagedResources() | Called when this object is being disposed by either Dispose() or Dispose(bool) and Disposed is |
| SetUtcLastModified(DateTime) | Marks the time when a resource being monitored was last changed. |
| StartMonitoring() | Starts the timer that will monitor this Watcher implementation. |
Events
| Name | Description |
|---|---|
| Changed | Occurs when a resource has changed. |