Table of Contents

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 T

The source collection.

targetCollection T

The collection representing the current state of the API

owner NamedEntity

The owner of the entities.

cancellationToken CancellationToken

The 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.