Click or drag to resize

DegreeDaysApi Constructor (IRequestProcessor)

Constructs a DegreeDaysApi object that internally uses the specified IRequestProcessor.

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


Type: DegreeDays.ApiIRequestProcessor
The non-null IRequestProcessor object to use internally for all operations.
ArgumentNullExceptionrequestProcessor is null.

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