Click or drag to resize

DataSpec Class

Defines a specification of a single set of degree-day data (or temperature data) in all aspects other than the location that the data should be generated for.
Inheritance Hierarchy

Namespace:  DegreeDays.Api.Data
Assembly:  DegreeDays (in DegreeDays.dll) Version: 1.3
public abstract class DataSpec

The DataSpec type exposes the following members.


A DataSpec defines a single set of data only (e.g. degree days in just one base temperature), but the DataSpecs class will enable you to include multiple DataSpec objects in a single LocationDataRequest.

To create a DataSpec object you can use the static factory methods of this class. For example:

DatedDataSpec thirtyMostRecentHddValues = DataSpec.Dated(

AverageDataSpec fiveYearAverageCdd = DataSpec.Average(

TimeSeriesDataSpec hourlyTempsForLastCalendarYear = DataSpec.TimeSeries(

See DatedDataSpec, AverageDataSpec, and TimeSeriesDataSpec for example code showing how to use each one individually to fetch data from the API. Though do remember that, as mentioned above, you can also fetch multiple sets of data in a single request.

This abstract class is not designed to be extended by third-party code, which is why it does not have an accessible constructor.

Thread Safety
All concrete subclasses of this abstract class are immutable. You can safely reuse them and call them from multiple threads at once.
See Also