Click or drag to resize

DataSetsBuilderAddFailure(String, Failure) Method

Adds an association between a string key from a DataSpec in the request and a Failure from the response.

Namespace: DegreeDays.Api.Data
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public DataSetsBuilder AddFailure(
	string key,
	Failure failure
)

Parameters

key  String
A string key from the XML response, associated with a particular DataSpec from the original XML request. If this builder was created with a DataSpecs object (which it typically would be), the key must match a key in that DataSpecs object. If you're parsing a genuine XML response the keys will match automatically, but, if you're setting up test objects, you can create a DataSpecs with your own custom keys for full control. Cannot be null, cannot be empty, cannot have more than 60 characters, and cannot contain characters outside of [-_.a-zA-Z0-9].
failure  Failure
The non-null Failure associated with key.

Return Value

DataSetsBuilder
this, for method chaining.
Exceptions
ExceptionCondition
ArgumentNullExceptionkey or failure is null.
FormatExceptionkey does not match the required specification.
ArgumentExceptionkey is not recognized as one from the original request (assuming this object has access to the DataSpecs to check), or if an item has already been added with key.
FormatExceptionkey does not match the required specification.
See Also