IConstantUnitConversionStore Interface
A data store used to create, read, update or delete constant unit conversions. Should only be instantiated by an IConstantUnitConversionStoreFactory.
public interface IConstantUnitConversionStore : HAKOM.Persistence.Core.Net.Api.Storage.IStore<HAKOM.Persistence.Core.Net.Api.Storage.IStorageProvider>Derived
↳ ISqlConstantUnitConversionStore
Implements HAKOM.Persistence.Core.Net.Api.Storage.IStore<IStorageProvider>
Methods
Section titled “Methods”IConstantUnitConversionStore.Configure(IStorageProvider, IUnitStore, CancellationToken) Method
Section titled “IConstantUnitConversionStore.Configure(IStorageProvider, IUnitStore, CancellationToken) Method”Configures the constant unit conversion store with the given parameters.
System.Threading.Tasks.Task Configure(HAKOM.Persistence.Core.Net.Api.Storage.IStorageProvider storageProvider, HAKOM.TSM.Net.Api.Units.Persistence.IUnitStore unitStore, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”storageProvider IStorageProvider
The IStorageProvider used for read and write operations on the storage.
unitStore IUnitStore
The IUnitStore used for creating unit references.
cancellationToken System.Threading.CancellationToken
Propagates a notification if the operations should be canceled.
Returns
Section titled “Returns”IConstantUnitConversionStore.Delete(string, CancellationToken) Method
Section titled “IConstantUnitConversionStore.Delete(string, CancellationToken) Method”Deletes the constant unit conversion with the given unit.
System.Threading.Tasks.Task Delete(string unit, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”unit System.String
The symbol of the unit of the conversion, which will be deleted.
cancellationToken System.Threading.CancellationToken
A token that may be used to cancel the operation.
Returns
Section titled “Returns”System.Threading.Tasks.Task
An awaitable System.Threading.Tasks.Task
IConstantUnitConversionStore.Find(CancellationToken) Method
Section titled “IConstantUnitConversionStore.Find(CancellationToken) Method”Finds all currently available constant unit conversions.
System.Collections.Generic.IAsyncEnumerable<HAKOM.TSM.Net.Api.Units.IConstantUnitConversion> Find(System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”cancellationToken System.Threading.CancellationToken
A token that may be used to cancel the operation.
Returns
Section titled “Returns”System.Collections.Generic.IAsyncEnumerable<IConstantUnitConversion>
An System.Collections.Generic.IAsyncEnumerable<> containing all available constant unit conversions.
IConstantUnitConversionStore.Load(IConstantUnitConversionReference, CancellationToken) Method
Section titled “IConstantUnitConversionStore.Load(IConstantUnitConversionReference, CancellationToken) Method”Loads the constant unit conversion.
System.Threading.Tasks.Task<HAKOM.TSM.Net.Api.Units.Persistence.References.IConstantUnitConversionReference> Load(HAKOM.TSM.Net.Api.Units.Persistence.References.IConstantUnitConversionReference constantUnitConversionReference, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”constantUnitConversionReference IConstantUnitConversionReference
The IConstantUnitConversionReference that will be loaded.
cancellationToken System.Threading.CancellationToken
A token that may be used to cancel the operation.
Returns
Section titled “Returns”System.Threading.Tasks.Task<IConstantUnitConversionReference>
An awaitable System.Threading.Tasks.Task<> containing the constant unit conversion with the given unit.
IConstantUnitConversionStore.Load(string, CancellationToken) Method
Section titled “IConstantUnitConversionStore.Load(string, CancellationToken) Method”Loads the constant unit conversion with the given unit.
System.Threading.Tasks.Task<HAKOM.TSM.Net.Api.Units.Persistence.References.IConstantUnitConversionReference> Load(string unit, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”unit System.String
The System.String unit of the constant unit conversion, which will be loaded.
cancellationToken System.Threading.CancellationToken
A token that may be used to cancel the operation.
Returns
Section titled “Returns”System.Threading.Tasks.Task<IConstantUnitConversionReference>
An awaitable System.Threading.Tasks.Task<> containing the constant unit conversion with the given unit.
IConstantUnitConversionStore.Save(IConstantUnitConversion, CancellationToken) Method
Section titled “IConstantUnitConversionStore.Save(IConstantUnitConversion, CancellationToken) Method”Saves a given unitConversion.
System.Threading.Tasks.Task Save(HAKOM.TSM.Net.Api.Units.IConstantUnitConversion unitConversion, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”unitConversion IConstantUnitConversion
The IConstantUnitConversion to be persisted.
cancellationToken System.Threading.CancellationToken
A token that may be used to cancel the operation.
Returns
Section titled “Returns”System.Threading.Tasks.Task
An awaitable System.Threading.Tasks.Task<>.
IConstantUnitConversionStore.SaveOrUpdate(IConstantUnitConversion, CancellationToken) Method
Section titled “IConstantUnitConversionStore.SaveOrUpdate(IConstantUnitConversion, CancellationToken) Method”Saves a new or updates an existing unitConversion.
System.Threading.Tasks.Task SaveOrUpdate(HAKOM.TSM.Net.Api.Units.IConstantUnitConversion unitConversion, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”unitConversion IConstantUnitConversion
The IConstantUnitConversion to look for and persist.
cancellationToken System.Threading.CancellationToken
A token that may be used to cancel the operation.
Returns
Section titled “Returns”System.Threading.Tasks.Task
An awaitable System.Threading.Tasks.Task.
IConstantUnitConversionStore.TryDelete(string, CancellationToken) Method
Section titled “IConstantUnitConversionStore.TryDelete(string, CancellationToken) Method”Deletes the constant unit conversion with the given unit.
System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result> TryDelete(string unit, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”unit System.String
The symbol of the unit of the conversion, which will be deleted.
cancellationToken System.Threading.CancellationToken
A token that may be used to cancel the operation.
Returns
Section titled “Returns”System.Threading.Tasks.Task<Result>
An awaitable System.Threading.Tasks.Task<> of Result.
Remarks
Section titled “Remarks”The Result will provide additional information about success or failure.
IConstantUnitConversionStore.TryFind(CancellationToken) Method
Section titled “IConstantUnitConversionStore.TryFind(CancellationToken) Method”Finds all currently available constant unit conversions.
System.Collections.Generic.IAsyncEnumerable<HAKOM.ErrorHandling.Core.Net.Api.Result<HAKOM.TSM.Net.Api.Units.IConstantUnitConversion>> TryFind(System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”cancellationToken System.Threading.CancellationToken
A token that may be used to cancel the operation.
Returns
Section titled “Returns”System.Collections.Generic.IAsyncEnumerable<HAKOM.ErrorHandling.Core.Net.Api.Result<IConstantUnitConversion>>
An System.Collections.Generic.IAsyncEnumerable<> containing all available constant unit conversions in the form of Result<TValue>.
IConstantUnitConversionStore.TryLoad(IConstantUnitConversionReference, CancellationToken) Method
Section titled “IConstantUnitConversionStore.TryLoad(IConstantUnitConversionReference, CancellationToken) Method”Loads the constant unit conversion.
System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result<HAKOM.TSM.Net.Api.Units.Persistence.References.IConstantUnitConversionReference>> TryLoad(HAKOM.TSM.Net.Api.Units.Persistence.References.IConstantUnitConversionReference constantUnitConversionReference, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”constantUnitConversionReference IConstantUnitConversionReference
The IConstantUnitConversionReference that will be loaded.
cancellationToken System.Threading.CancellationToken
A token that may be used to cancel the operation.
Returns
Section titled “Returns”System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result<IConstantUnitConversionReference>>
An awaitable System.Threading.Tasks.Task<> of Result<TValue> containing the constant unit conversion with the given unit.
Remarks
Section titled “Remarks”The Result will provide additional information about success or failure.
IConstantUnitConversionStore.TryLoad(string, CancellationToken) Method
Section titled “IConstantUnitConversionStore.TryLoad(string, CancellationToken) Method”Loads the constant unit conversion with the given unit.
System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result<HAKOM.TSM.Net.Api.Units.Persistence.References.IConstantUnitConversionReference>> TryLoad(string unit, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”unit System.String
The System.String unit of the constant unit conversion, which will be loaded.
cancellationToken System.Threading.CancellationToken
A token that may be used to cancel the operation.
Returns
Section titled “Returns”System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result<IConstantUnitConversionReference>>
An awaitable System.Threading.Tasks.Task<> of Result<TValue> containing the constant unit conversion with the given unit.
Remarks
Section titled “Remarks”The Result will provide additional information about success or failure.
IConstantUnitConversionStore.TrySave(IConstantUnitConversion, CancellationToken) Method
Section titled “IConstantUnitConversionStore.TrySave(IConstantUnitConversion, CancellationToken) Method”Saves a given unitConversion.
System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result> TrySave(HAKOM.TSM.Net.Api.Units.IConstantUnitConversion unitConversion, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”unitConversion IConstantUnitConversion
The IConstantUnitConversion to be persisted.
cancellationToken System.Threading.CancellationToken
A token that may be used to cancel the operation.
Returns
Section titled “Returns”System.Threading.Tasks.Task<Result>
An awaitable System.Threading.Tasks.Task<> of Result.
Remarks
Section titled “Remarks”The Result will provide additional information about success or failure.
IConstantUnitConversionStore.TrySaveOrUpdate(IConstantUnitConversion, CancellationToken) Method
Section titled “IConstantUnitConversionStore.TrySaveOrUpdate(IConstantUnitConversion, CancellationToken) Method”Saves a new or updates an existing unitConversion.
System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result> TrySaveOrUpdate(HAKOM.TSM.Net.Api.Units.IConstantUnitConversion unitConversion, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”unitConversion IConstantUnitConversion
The IConstantUnitConversion to look for and persist.
cancellationToken System.Threading.CancellationToken
A token that may be used to cancel the operation.
Returns
Section titled “Returns”System.Threading.Tasks.Task<Result>
An awaitable System.Threading.Tasks.Task<> of Result.
Remarks
Section titled “Remarks”The Result will provide additional information about success or failure.