Method CompareAndApply
- Namespace
- Kepware.Api.ClientHandler
- Assembly
- Kepware.Api.dll
CompareAndApply<T, K>(T?, T?, NamedEntity?, CancellationToken)
Compares two collections of entities and applies the changes to the target collection. Left should represent the source collection and Right should represent the target collection in the Kepware server.
public Task<EntityCompare.CollectionResultBucket<K>> CompareAndApply<T, K>(T? sourceCollection, T? targetCollection, NamedEntity? owner = null, CancellationToken cancellationToken = default) where T : EntityCollection<K> where K : NamedEntity, new()
Parameters
sourceCollection
TThe source collection.
targetCollection
TThe collection representing the current state of the API
owner
NamedEntityThe owner of the entities.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<EntityCompare.CollectionResultBucket<K>>
A task that represents the asynchronous operation. The task result contains the comparison result.
Type Parameters
T
The type of the entity collection.
K
The type of the entity.