Interface INexusClient
- Namespace
- Nexus.Api
- Assembly
- Nexus.Api.dll
A client for the Nexus system.
public interface INexusClient
Properties
V1
Gets the V1 client.
IV1 V1 { get; }
Property Value
V2
Gets the V2 client.
IV2 V2 { get; }
Property Value
Methods
AttachConfiguration(object)
Attaches configuration data to subsequent API requests.
IDisposable AttachConfiguration(object configuration)
Parameters
configurationobjectThe configuration data.
Returns
ClearConfiguration()
Clears configuration data for all subsequent API requests.
void ClearConfiguration()
Export(DateTime, DateTime, TimeSpan, string?, IEnumerable<string>, IReadOnlyDictionary<string, object>?, string, Precision, Action<double, string>?)
This high-level methods simplifies exporting multiple resources at once.
void Export(DateTime begin, DateTime end, TimeSpan filePeriod, string? fileFormat, IEnumerable<string> resourcePaths, IReadOnlyDictionary<string, object>? configuration, string targetFolder, Precision precision, Action<double, string>? onProgress = null)
Parameters
beginDateTimeThe begin date/time.
endDateTimeThe end date/time.
filePeriodTimeSpanThe file period. Use TimeSpan.Zero to get a single file.
fileFormatstringThe target file format. If null, data will be read (and possibly cached) but not returned. This is useful for data pre-aggregation.
resourcePathsIEnumerable<string>The resource paths to export.
configurationIReadOnlyDictionary<string, object>The configuration.
targetFolderstringThe target folder for the files to extract.
precisionPrecisionThe floating point precision used for exported sample values.
onProgressAction<double, string>A callback which accepts the current progress and the progress message.
ExportAsync(DateTime, DateTime, TimeSpan, string?, IEnumerable<string>, IReadOnlyDictionary<string, object>?, string, Precision, Action<double, string>?, CancellationToken)
This high-level methods simplifies exporting multiple resources at once.
Task ExportAsync(DateTime begin, DateTime end, TimeSpan filePeriod, string? fileFormat, IEnumerable<string> resourcePaths, IReadOnlyDictionary<string, object>? configuration, string targetFolder, Precision precision, Action<double, string>? onProgress = null, CancellationToken cancellationToken = default)
Parameters
beginDateTimeThe begin date/time.
endDateTimeThe end date/time.
filePeriodTimeSpanThe file period. Use TimeSpan.Zero to get a single file.
fileFormatstringThe target file format. If null, data will be read (and possibly cached) but not returned. This is useful for data pre-aggregation.
resourcePathsIEnumerable<string>The resource paths to export.
configurationIReadOnlyDictionary<string, object>The configuration.
targetFolderstringThe target folder for the files to extract.
precisionPrecisionThe floating point precision used for exported sample values.
onProgressAction<double, string>A callback which accepts the current progress and the progress message.
cancellationTokenCancellationTokenA token to cancel the current operation.
Returns
LoadAsync<T>(DateTime, DateTime, IEnumerable<string>, Action<double>?, CancellationToken)
This high-level methods simplifies loading multiple resources at once.
Task<IReadOnlyDictionary<string, DataResponse<T>>> LoadAsync<T>(DateTime begin, DateTime end, IEnumerable<string> resourcePaths, Action<double>? onProgress = null, CancellationToken cancellationToken = default) where T : struct
Parameters
beginDateTimeStart date/time.
endDateTimeEnd date/time.
resourcePathsIEnumerable<string>The resource paths.
onProgressAction<double>A callback which accepts the current progress.
cancellationTokenCancellationTokenA token to cancel the current operation.
Returns
Type Parameters
LoadAsync<T>(DateTime, DateTime, IEnumerable<string>, Func<string, int, long, Memory<T>>, Action<double>?, CancellationToken)
This high-level methods simplifies loading multiple resources at once into caller-provided buffers.
Task<IReadOnlyDictionary<string, ResourceInfo>> LoadAsync<T>(DateTime begin, DateTime end, IEnumerable<string> resourcePaths, Func<string, int, long, Memory<T>> bufferProvider, Action<double>? onProgress = null, CancellationToken cancellationToken = default) where T : struct
Parameters
beginDateTimeStart date/time.
endDateTimeEnd date/time.
resourcePathsIEnumerable<string>The resource paths.
bufferProviderFunc<string, int, long, Memory<T>>A callback which provides a writable buffer for each resource path, chunk element count, and remaining resource element count.
onProgressAction<double>A callback which accepts the current progress.
cancellationTokenCancellationTokenA token to cancel the current operation.
Returns
Type Parameters
Load<T>(DateTime, DateTime, IEnumerable<string>, Action<double>?)
This high-level methods simplifies loading multiple resources at once.
IReadOnlyDictionary<string, DataResponse<T>> Load<T>(DateTime begin, DateTime end, IEnumerable<string> resourcePaths, Action<double>? onProgress = null) where T : struct
Parameters
beginDateTimeStart date/time.
endDateTimeEnd date/time.
resourcePathsIEnumerable<string>The resource paths.
onProgressAction<double>A callback which accepts the current progress.
Returns
Type Parameters
Load<T>(DateTime, DateTime, IEnumerable<string>, Func<string, int, long, Memory<T>>, Action<double>?)
This high-level methods simplifies loading multiple resources at once into caller-provided buffers.
IReadOnlyDictionary<string, ResourceInfo> Load<T>(DateTime begin, DateTime end, IEnumerable<string> resourcePaths, Func<string, int, long, Memory<T>> bufferProvider, Action<double>? onProgress = null) where T : struct
Parameters
beginDateTimeStart date/time.
endDateTimeEnd date/time.
resourcePathsIEnumerable<string>The resource paths.
bufferProviderFunc<string, int, long, Memory<T>>A callback which provides a writable buffer for each resource path, chunk element count, and remaining resource element count.
onProgressAction<double>A callback which accepts the current progress.
Returns
Type Parameters
SignIn(string)
Signs in the user.
void SignIn(string accessToken)
Parameters
accessTokenstringThe access token.