Table of Contents

Interface IDataSource

Namespace
Nexus.Extensibility
Assembly
Nexus.Extensibility.dll

A base interface for IDataSource>T<.

public interface IDataSource

Methods

EnrichCatalogAsync(ResourceCatalog, CancellationToken)

Enriches the provided ResourceCatalog.

Task<ResourceCatalog> EnrichCatalogAsync(ResourceCatalog catalog, CancellationToken cancellationToken)

Parameters

catalog ResourceCatalog

The catalog to enrich.

cancellationToken CancellationToken

A token to cancel the current operation.

Returns

Task<ResourceCatalog>

The catalog request task.

GetAvailabilityAsync(string, DateTime, DateTime, CancellationToken)

Gets the availability of the ResourceCatalog. Implementations must be thread-safe because Nexus may call this method concurrently on the same data source instance.

Task<double> GetAvailabilityAsync(string catalogId, DateTime begin, DateTime end, CancellationToken cancellationToken)

Parameters

catalogId string

The catalog identifier.

begin DateTime

The begin of the availability period.

end DateTime

The end of the availability period.

cancellationToken CancellationToken

A token to cancel the current operation.

Returns

Task<double>

The availability task.

GetCatalogRegistrationsAsync(string, CancellationToken)

Gets the catalog registrations that are located under path.

Task<CatalogRegistration[]> GetCatalogRegistrationsAsync(string path, CancellationToken cancellationToken)

Parameters

path string

The parent path for which to return catalog registrations.

cancellationToken CancellationToken

A token to cancel the current operation.

Returns

Task<CatalogRegistration[]>

The catalog identifiers task.

GetTimeRangeAsync(string, CancellationToken)

Gets the time range of the ResourceCatalog.

Task<CatalogTimeRange> GetTimeRangeAsync(string catalogId, CancellationToken cancellationToken)

Parameters

catalogId string

The catalog identifier.

cancellationToken CancellationToken

A token to cancel the current operation.

Returns

Task<CatalogTimeRange>

The time range task.

ReadAsync(DateTime, DateTime, ReadRequest[], ReadDataHandler, IProgress<double>, CancellationToken)

Performs a number of read requests. Implementations must be thread-safe because Nexus may call this method concurrently on the same data source instance.

Task ReadAsync(DateTime begin, DateTime end, ReadRequest[] requests, ReadDataHandler readData, IProgress<double> progress, CancellationToken cancellationToken)

Parameters

begin DateTime

The beginning of the period to read.

end DateTime

The end of the period to read.

requests ReadRequest[]

The array of read requests.

readData ReadDataHandler

A delegate to asynchronously read data from Nexus.

progress IProgress<double>

An object to report the read progress between 0.0 and 1.0.

cancellationToken CancellationToken

A token to cancel the current operation.

Returns

Task

The task.