Table of Contents

Class HttpWatcherOptions

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

Configuration options for HttpWatcher.

public class HttpWatcherOptions : WatcherOptions, IValidatableParameterObject, IParameterObject
Inheritance
HttpWatcherOptions
Implements
Inherited Members

Constructors

HttpWatcherOptions()

Initializes a new instance of the HttpWatcherOptions class.

public HttpWatcherOptions()

Remarks

The following table shows the initial property values for an instance of HttpWatcherOptions.

PropertyInitial Value
ClientFactory
() => new HttpClient(new HttpClientHandler()
{
   AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
   MaxAutomaticRedirections = 10
 }, false)
HashFactory() => new CyclicRedundancyCheck64()
ReadResponseBodyfalse

Properties

ClientFactory

Gets or sets the function delegate that will resolve an instance of HttpClient.

public Func<HttpClient> ClientFactory { get; set; }

Property Value

Func<HttpClient>

The function delegate that will resolve an instance of HttpClient.

HashFactory

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

public Func<Hash> HashFactory { get; set; }

Property Value

Func<Hash>

The function delegate that will resolve an implementation of Hash.

ReadResponseBody

Gets or sets a value indicating whether to compute a hash from the response data of the HttpWatcher.

public bool ReadResponseBody { get; set; }

Property Value

Boolean

true to compute a hash from the response data of the HttpWatcher; otherwise, false.

Methods

ValidateOptions()

Determines whether the public read-write properties of this instance are in a valid state.

public void ValidateOptions()

Remarks

This method is expected to throw exceptions when one or more conditions fails to be in a valid state.

Exceptions

InvalidOperationException

ClientFactory cannot be null - or - HashFactory cannot be null.