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
sourceCollectionTThe source collection.
targetCollectionTThe collection representing the current state of the API
ownerNamedEntityThe owner of the entities.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<EntityCompare.CollectionResultBucket<K>>
A task that represents the asynchronous operation. The task result contains the comparison result as EntityCompare.CollectionResultBucket<K>.
Type Parameters
TThe type of the entity collection.
KThe type of the entity.