Table of Contents

Method UpdateItemAsync

Namespace
Kepware.Api.ClientHandler
Assembly
Kepware.Api.dll

UpdateItemAsync<T>(T, T?, CancellationToken)

Updates an item in the Kepware server.

public Task<bool> UpdateItemAsync<T>(T item, T? oldItem = null, CancellationToken cancellationToken = default) where T : NamedEntity, new()

Parameters

item T

The item to update.

oldItem T

The old item.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<bool>

A task that represents the asynchronous operation. The task result contains a boolean indicating whether the update was successful.

Type Parameters

T

The type of the item.

UpdateItemAsync<T>(string, T, T, CancellationToken)

protected Task<bool> UpdateItemAsync<T>(string endpoint, T item, T currentEntity, CancellationToken cancellationToken = default) where T : NamedEntity, new()

Parameters

endpoint string
item T
currentEntity T
cancellationToken CancellationToken

Returns

Task<bool>

Type Parameters

T

UpdateItemAsync<T, K>(K, K?, NamedEntity?, CancellationToken)

Updates an item in the Kepware server.

public Task<bool> UpdateItemAsync<T, K>(K item, K? oldItem = null, NamedEntity? owner = null, CancellationToken cancellationToken = default) where T : EntityCollection<K> where K : NamedEntity, new()

Parameters

item K

The item to update.

oldItem K

The old item.

owner NamedEntity

The owner of the entities.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<bool>

A task that represents the asynchronous operation.

Type Parameters

T

The type of the entity collection.

K

The type of the item.