Table of Contents

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

name string

The name of the entity to load. If null, loads the default entity.

cancellationToken CancellationToken

A token that can be used to request cancellation of the operation.

Returns

Task<T>

The loaded entity of type T or null if not found.

Type Parameters

T

The 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

owner IEnumerable<string>

The owner of the entity.

cancellationToken CancellationToken

A token that can be used to request cancellation of the operation.

Returns

Task<T>

The loaded entity of type T or null if not found.

Type Parameters

T

The 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

name string

The name of the entity to load.

owner NamedEntity

The owner of the entity.

cancellationToken CancellationToken

A token that can be used to request cancellation of the operation.

Returns

Task<T>

The loaded entity of type T or null if not found.

Type Parameters

T

The type of the entity to load.