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
itemTThe item to update.
oldItemTThe old item.
cancellationTokenCancellationTokenThe 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
TThe 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
endpointstringitemTcurrentEntityTcancellationTokenCancellationToken
Returns
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
itemKThe item to update.
oldItemKThe old item.
ownerNamedEntityThe owner of the entities.
cancellationTokenCancellationTokenThe 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
TThe type of the entity collection.
KThe type of the item.