Table of Contents

Class HttpWatcher

Namespace
Cuemon.Net.Http
Assembly
Cuemon.Net.dll

Provides a watcher implementation designed to monitor and signal changes applied to an URI resource by raising the Changed event.

public class HttpWatcher : Watcher, IWatcher, IDisposable
Inheritance
Object
HttpWatcher
Implements
IDisposable
Inherited Members

Constructors

HttpWatcher(Uri, Action<HttpWatcherOptions>)

Initializes a new instance of the HttpWatcher class.

public HttpWatcher(Uri location, Action<HttpWatcherOptions> setup = null)

Parameters

location Uri

The URI to monitor.

setup Action<HttpWatcherOptions>

The HttpWatcherOptions which may be configured.

Properties

Checksum

Gets the checksum that is associated with the URI specified in Location.

public string Checksum { get; }

Property Value

String

The checksum that is associated with the URI specified in Location.

Remarks

If ReadResponseBody is false this property will remain null.

ClientFactory

Gets the function delegate that will resolve an instance of System.Net.Http.HttpClient.

public Func<HttpClient> ClientFactory { get; }

Property Value

Func<HttpClient>

The function delegate that will resolve an instance of System.Net.Http.HttpClient.

HashFactory

Gets the function delegate that will resolve an implementation of Hash.

public Func<Hash> HashFactory { get; }

Property Value

Func<Hash>

The function delegate that will resolve an implementation of Hash.

Location

Gets the URI of the resource to watch.

public Uri Location { get; }

Property Value

Uri

The URI to monitor.

ReadResponseBody

Gets a value indicating whether to compute a hash from the response body.

public bool ReadResponseBody { get; }

Property Value

Boolean

true to compute a hash from the response body; otherwise, false.

Methods

HandleSignalingAsync()

Handles the signaling of this HttpWatcher.

protected override async Task HandleSignalingAsync()

Returns

Task

The task object representing the asynchronous operation.

See Also