Click or drag to resize

DegreeDaysApi(IRequestProcessor) Constructor

Constructs a DegreeDaysApi object that internally uses the specified IRequestProcessor.

Namespace: DegreeDays.Api
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public DegreeDaysApi(
	IRequestProcessor requestProcessor
)

Parameters

requestProcessor  IRequestProcessor
The non-null IRequestProcessor object to use internally for all operations.
Exceptions
ExceptionCondition
ArgumentNullExceptionrequestProcessor is null.
Remarks

We can think of two main reasons that you might want to use this instead of the constructor that creates a default IRequestProcessor automatically:

  1. So that you can pass in your own mock IRequestProcessor for testing.
  2. So that you can pass in a customized version of XmlHttpRequestProcessor. You might, for example, want to change the endpoint URL, or swap the default System.Net-based IHttpRequestDispatcher for one that uses an alternative HTTP library instead (if your app uses an alternative HTTP library elsewhere).
See Also