Skip to content
Documentation

IUnitStore Interface

A data store used to create, read, update or delete units. Should only be instantiated by an IUnitStoreFactory.

public interface IUnitStore : HAKOM.Persistence.Core.Net.Api.Storage.IStore<HAKOM.Persistence.Core.Net.Api.Storage.IStorageProvider>

Implements HAKOM.Persistence.Core.Net.Api.Storage.IStore<IStorageProvider>

The IUnitReferenceFactory which can create a reference to an IUnit.

HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReferenceFactory References { get; }

IUnitReferenceFactory

IUnitStore.Delete(string, CancellationToken) Method

Section titled “IUnitStore.Delete(string, CancellationToken) Method”

Deletes the unit by the given unit symbol.

System.Threading.Tasks.Task Delete(string unit, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

unit System.String

The symbol of the unit to be deleted.

cancellationToken System.Threading.CancellationToken

A token that may be used to cancel the operation.

System.Threading.Tasks.Task
A System.Threading.Tasks.Task

Finds all currently available units as IUnitReference.

System.Collections.Generic.IAsyncEnumerable<HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference> Find(System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

cancellationToken System.Threading.CancellationToken

A token that may be used to cancel the operation.

System.Collections.Generic.IAsyncEnumerable<IUnitReference>
An System.Collections.Generic.IAsyncEnumerable<> containing all available units.

IUnitStore.Load(IUnitReference, CancellationToken) Method

Section titled “IUnitStore.Load(IUnitReference, CancellationToken) Method”

Loads an existing unit as IUnitReference from the store.

System.Threading.Tasks.Task<HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference> Load(HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference reference, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

reference IUnitReference

A reference to the existing unit that should be retrieved from the store.

cancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken that can be used to attempt to cancel the operation.

System.Threading.Tasks.Task<IUnitReference>
A System.Threading.Tasks.Task<> containing the requested unit.

IUnitStore.Load(string, CancellationToken) Method

Section titled “IUnitStore.Load(string, CancellationToken) Method”

Loads the unit as IUnitReference by the given unit symbol.

System.Threading.Tasks.Task<HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference> Load(string unit, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

unit System.String

The symbol of the unit to be loaded.

cancellationToken System.Threading.CancellationToken

A token that may be used to cancel the operation.

System.Threading.Tasks.Task<IUnitReference>
A System.Threading.Tasks.Task<> containing the requested unit.

UnitNotFoundException
May be thrown (depending on implementation) if the unit identified by unit is not found in the store.

IUnitStore.Save(IUnit, CancellationToken) Method

Section titled “IUnitStore.Save(IUnit, CancellationToken) Method”

Saves a given unit.

System.Threading.Tasks.Task<HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference> Save(HAKOM.TSM.Net.Api.Units.IUnit unit, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

unit IUnit

The IUnit to be saved.

cancellationToken System.Threading.CancellationToken

A token that may be used to cancel the operation.

System.Threading.Tasks.Task<IUnitReference>
A System.Threading.Tasks.Task containing the saved IUnitReference.

IUnitStore.SaveOrUpdate(IUnit, CancellationToken) Method

Section titled “IUnitStore.SaveOrUpdate(IUnit, CancellationToken) Method”

Saves a new or updates an existing unit.

System.Threading.Tasks.Task<HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference> SaveOrUpdate(HAKOM.TSM.Net.Api.Units.IUnit unit, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

unit IUnit

The IUnit to look for and to save.

cancellationToken System.Threading.CancellationToken

A token that may be used to cancel the operation.

System.Threading.Tasks.Task<IUnitReference>
A System.Threading.Tasks.Task containing the saved IUnitReference.

IUnitStore.TryDelete(string, CancellationToken) Method

Section titled “IUnitStore.TryDelete(string, CancellationToken) Method”

Deletes the unit by the given unit symbol.

System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result> TryDelete(string unit, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

unit System.String

The symbol of the unit to be deleted.

cancellationToken System.Threading.CancellationToken

A token that may be used to cancel the operation.

System.Threading.Tasks.Task<Result>
A System.Threading.Tasks.Task<> of Result.

The Result will provide additional information about success or failure.

IUnitStore.TryFind(CancellationToken) Method

Section titled “IUnitStore.TryFind(CancellationToken) Method”

Finds all currently available units as IUnitReference.

System.Collections.Generic.IAsyncEnumerable<HAKOM.ErrorHandling.Core.Net.Api.Result<HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference>> TryFind(System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

cancellationToken System.Threading.CancellationToken

A token that may be used to cancel the operation.

System.Collections.Generic.IAsyncEnumerable<HAKOM.ErrorHandling.Core.Net.Api.Result<IUnitReference>>
An System.Collections.Generic.IAsyncEnumerable<> containing all available units in the form of Result<TValue>.

IUnitStore.TryLoad(IUnitReference, CancellationToken) Method

Section titled “IUnitStore.TryLoad(IUnitReference, CancellationToken) Method”

Attempts to load the given existing unit as IUnitReference from the store.

System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result<HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference>> TryLoad(HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference reference, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

reference IUnitReference

A reference to the existing unit that should be loaded.

cancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken that can be used to attempt to cancel the operation.

System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result<IUnitReference>>
A System.Threading.Tasks.Task<> of Result<TValue> containing the requested IUnit.

IUnitStore.TryLoad(string, CancellationToken) Method

Section titled “IUnitStore.TryLoad(string, CancellationToken) Method”

Loads the unit as IUnitReference by the given unit symbol.

System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result<HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference>> TryLoad(string unit, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

unit System.String

The symbol of the unit to be loaded.

cancellationToken System.Threading.CancellationToken

A token that may be used to cancel the operation.

System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result<IUnitReference>>
A System.Threading.Tasks.Task<> of Result<TValue> containing the requested IUnit.

The Result will provide additional information about success or failure of the operation.

IUnitStore.TrySave(IUnit, CancellationToken) Method

Section titled “IUnitStore.TrySave(IUnit, CancellationToken) Method”

Saves a given unit.

System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result<HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference>> TrySave(HAKOM.TSM.Net.Api.Units.IUnit unit, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

unit IUnit

The IUnit to be saved.

cancellationToken System.Threading.CancellationToken

A token that may be used to cancel the operation.

System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result<IUnitReference>>
A System.Threading.Tasks.Task<> of Result<TValue> containing the saved IUnitReference.

The Result will provide additional information about success or failure of the operation.

IUnitStore.TrySaveOrUpdate(IUnit, CancellationToken) Method

Section titled “IUnitStore.TrySaveOrUpdate(IUnit, CancellationToken) Method”

Saves a new or updates an existing unit.

System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result<HAKOM.TSM.Net.Api.Units.Persistence.References.IUnitReference>> TrySaveOrUpdate(HAKOM.TSM.Net.Api.Units.IUnit unit, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

unit IUnit

The IUnit to look for and to save.

cancellationToken System.Threading.CancellationToken

A token that may be used to cancel the operation.

System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result<IUnitReference>>
A System.Threading.Tasks.Task<> of Result<TValue> containing the saved IUnitReference.

The Result will provide additional information about success or failure.

© 2026 Volue.Version v0.6.38017 November 2026