Table of Contents

Method CompareAndApplyDetailedAsync

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

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

Compares two collections and applies changes while returning detailed success and failure information. Left should represent the source collection and Right should represent the target collection in the Kepware server.

public Task<CollectionApplyResult<K>> CompareAndApplyDetailedAsync<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<CollectionApplyResult<K>>

A detailed apply result including successful counts and failed item details.

Type Parameters

T

The type of the entity collection.

K

The type of the entity.