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
catalogResourceCatalogThe catalog to enrich.
cancellationTokenCancellationTokenA 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
catalogIdstringThe catalog identifier.
beginDateTimeThe begin of the availability period.
endDateTimeThe end of the availability period.
cancellationTokenCancellationTokenA token to cancel the current operation.
Returns
GetCatalogRegistrationsAsync(string, CancellationToken)
Gets the catalog registrations that are located under path.
Task<CatalogRegistration[]> GetCatalogRegistrationsAsync(string path, CancellationToken cancellationToken)
Parameters
pathstringThe parent path for which to return catalog registrations.
cancellationTokenCancellationTokenA 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
catalogIdstringThe catalog identifier.
cancellationTokenCancellationTokenA 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
beginDateTimeThe beginning of the period to read.
endDateTimeThe end of the period to read.
requestsReadRequest[]The array of read requests.
readDataReadDataHandlerA delegate to asynchronously read data from Nexus.
progressIProgress<double>An object to report the read progress between 0.0 and 1.0.
cancellationTokenCancellationTokenA token to cancel the current operation.
Returns
- Task
The task.