Class NexusClient
- Namespace
- Nexus.Api
- Assembly
- Nexus.Api.dll
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
public class NexusClient : INexusClient, IDisposable
- Inheritance
-
NexusClient
- Implements
- Inherited Members
Constructors
NexusClient(HttpClient)
Initializes a new instance of the NexusClient.
public NexusClient(HttpClient httpClient)
Parameters
httpClientHttpClientThe HTTP client to use.
NexusClient(Uri)
Initializes a new instance of the NexusClient.
public NexusClient(Uri baseUrl)
Parameters
baseUrlUriThe base URL to connect to.
Properties
IsAuthenticated
Gets a value which indicates if the user is authenticated.
public bool IsAuthenticated { get; }
Property Value
V1
Gets the V1 client.
public IV1 V1 { get; }
Property Value
V2
Gets the V2 client.
public IV2 V2 { get; }
Property Value
Methods
AttachConfiguration(object)
Attaches configuration data to subsequent API requests.
public IDisposable AttachConfiguration(object configuration)
Parameters
configurationobjectThe configuration data.
Returns
ClearConfiguration()
Clears configuration data for all subsequent API requests.
public void ClearConfiguration()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
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.
public 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.
public 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.
public 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.
public 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.
public 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.
public 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.
public void SignIn(string accessToken)
Parameters
accessTokenstringThe access token.