WatcherOptions Class
Definition
Configuration options for IWatcher.
public class WatcherOptions : IParameterObject
- Inheritance
-
WatcherOptions
- Implements
- Derived
Examples
The following example demonstrates how to configure a WatcherOptions for a file system watcher.
using System;
using Cuemon.Runtime;
namespace Examples;
public class WatcherConfigurationExample
{
public WatcherOptions ConfigureWatcher()
{
return new WatcherOptions
{
DueTime = TimeSpan.FromSeconds(5),
DueTimeOnChanged = TimeSpan.FromSeconds(2),
Period = TimeSpan.FromMinutes(1)
};
}
}
Constructors
| Name | Description |
|---|---|
| WatcherOptions() | Initializes a new instance of the WatcherOptions class. |
Properties
| Name | Description |
|---|---|
| DueTime | Gets or sets the TimeSpan representing the amount of time to delay before the IWatcher starts signaling. |
| DueTimeOnChanged | Gets or sets the amount of time to postpone a Changed event. |
| Period | Gets or sets the time interval between periodic signaling. |