Method LoadEntityAsync
- Namespace
- Kepware.Api.ClientHandler
- Assembly
- Kepware.Api.dll
LoadEntityAsync<T>(string?, CancellationToken)
Loads an entity of type T asynchronously by its name from the Kepware server.
public Task<T?> LoadEntityAsync<T>(string? name = null, CancellationToken cancellationToken = default) where T : BaseEntity, new()
Parameters
namestringThe name of the entity to load. If null, loads the default entity.
cancellationTokenCancellationTokenA token that can be used to request cancellation of the operation.
Returns
- Task<T>
The loaded entity of type
Tor null if not found.
Type Parameters
TThe type of the entity to load.
LoadEntityAsync<T>(IEnumerable<string>, CancellationToken)
Loads an entity of type T asynchronously by its owner from the Kepware server.
public Task<T?> LoadEntityAsync<T>(IEnumerable<string> owner, CancellationToken cancellationToken = default) where T : BaseEntity, new()
Parameters
ownerIEnumerable<string>The owner of the entity.
cancellationTokenCancellationTokenA token that can be used to request cancellation of the operation.
Returns
- Task<T>
The loaded entity of type
Tor null if not found.
Type Parameters
TThe type of the entity to load.
LoadEntityAsync<T>(string, NamedEntity, CancellationToken)
Loads an entity of type T asynchronously by its name and owner from the Kepware server.
public Task<T?> LoadEntityAsync<T>(string name, NamedEntity owner, CancellationToken cancellationToken = default) where T : BaseEntity, new()
Parameters
namestringThe name of the entity to load.
ownerNamedEntityThe owner of the entity.
cancellationTokenCancellationTokenA token that can be used to request cancellation of the operation.
Returns
- Task<T>
The loaded entity of type
Tor null if not found.
Type Parameters
TThe type of the entity to load.