Table of Contents

Watcher Class

Definition

Namespace
Cuemon.Runtime
Assemblies
Cuemon.Core.dll
Source
src/Cuemon.Core/Runtime/Watcher.cs

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 disposing set to true and Disposed is false.

OnDisposeUnmanagedResources()

Called when this object is being disposed by either Dispose() or Dispose(bool) and Disposed is false.

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.