Class HttpWatcherOptions
- Namespace
- Cuemon.Net.Http
- Assembly
- Cuemon.Net.dll
Configuration options for HttpWatcher.
public class HttpWatcherOptions : WatcherOptions, IValidatableParameterObject, IParameterObject
- Inheritance
-
ObjectHttpWatcherOptions
- 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.
Property | Initial Value |
---|---|
ClientFactory |
|
HashFactory | () => new CyclicRedundancyCheck64() |
ReadResponseBody | false |
Properties
ClientFactory
Gets or sets the function delegate that will resolve an instance of System.Net.Http.HttpClient.
public Func<HttpClient> ClientFactory { get; set; }
Property Value
- Func<HttpClient>
The function delegate that will resolve an instance of System.Net.Http.HttpClient.
HashFactory
Gets or sets the function delegate that will resolve an implementation of Hash.
public Func<Hash> HashFactory { get; set; }
Property Value
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
- System.InvalidOperationException
ClientFactory cannot be null - or - HashFactory cannot be null.