Class NetWatcher
A Watcher implementation, that can monitor and signal changes of one or more URI locations by raising the Changed event.
Implements
Inherited Members
Namespace: Cuemon.Net
Assembly: Cuemon.Net.dll
Syntax
public sealed class NetWatcher : Watcher, IDisposable
Constructors
| Improve this DocNetWatcher(Uri)
Initializes a new instance of the NetWatcher class.
Declaration
public NetWatcher(Uri requestUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | requestUri | The request URI to monitor for changes. |
Remarks
Monitors the provided requestUri
for changes in an interval of two minutes, using the last modified timestamp of the ressource.
NetWatcher(Uri, Boolean)
Initializes a new instance of the NetWatcher class.
Declaration
public NetWatcher(Uri requestUri, bool checkResponseData)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | requestUri | The request URI to monitor for changes. |
System.Boolean | checkResponseData | if set to |
Remarks
Monitors the provided requestUri
for changes in an interval of two minutes, determined by checkResponseData
.
NetWatcher(Uri, TimeSpan)
Initializes a new instance of the NetWatcher class.
Declaration
public NetWatcher(Uri requestUri, TimeSpan period)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | requestUri | The request URI to monitor for changes. |
System.TimeSpan | period | The time interval between periodic signaling for changes of provided |
Remarks
Monitors the provided requestUri
for changes in an interval specified by period
, using the last modified time stamp of the resource.
NetWatcher(Uri, TimeSpan, Boolean)
Initializes a new instance of the NetWatcher class.
Declaration
public NetWatcher(Uri requestUri, TimeSpan period, bool checkResponseData)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | requestUri | The request URI to monitor for changes. |
System.TimeSpan | period | The time interval between periodic signaling for changes of provided |
System.Boolean | checkResponseData | if set to |
Remarks
Monitors the provided requestUri
for changes in an interval specified by period
, determined by checkResponseData
. The signaling is default delayed 15 seconds before first invoke.
NetWatcher(Uri, TimeSpan, TimeSpan, Boolean)
Initializes a new instance of the NetWatcher class.
Declaration
public NetWatcher(Uri requestUri, TimeSpan dueTime, TimeSpan period, bool checkResponseData)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | requestUri | The request URI to 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 provided |
System.Boolean | checkResponseData | if set to |
Remarks
Monitors the provided requestUri
for changes in an interval specified by period
, determined by checkResponseData
.
Properties
| Improve this DocCheckResponseData
Gets a value indicating whether to perform a MD5 hash-check of the response data from the RequestUri.
Declaration
public bool CheckResponseData { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
RequestUri
Gets the associated request URI of this NetWatcher.
Declaration
public Uri RequestUri { get; }
Property Value
Type | Description |
---|---|
System.Uri | The associated request URI of this NetWatcher. |
Scheme
Gets the UriScheme of this NetWatcher.
Declaration
public UriScheme Scheme { get; }
Property Value
Type | Description |
---|---|
UriScheme | An UriScheme of this NetWatcher. |
Methods
| Improve this DocHandleSignaling()
Handles the signaling of this NetWatcher.
Declaration
protected override void HandleSignaling()