Table of Contents

Class GenericApiHandler

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

Provides general operation APIs related to configuring objects in the Kepware server.

public class GenericApiHandler
Inheritance
GenericApiHandler
Inherited Members

Methods

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

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.

DeleteItemAsync<T>(string, CancellationToken)

Deletes an item from the Kepware server using the item name.

DeleteItemAsync<T>(string[], CancellationToken)
DeleteItemAsync<T>(T, CancellationToken)

Deletes an item from the Kepware server.

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

Deletes an item from the Kepware server.

DeleteItemByEndpointAsync<T>(string, CancellationToken)
DeleteItemsAsync<T, K>(List<K>, NamedEntity?, CancellationToken)

Deletes a list of items from the Kepware server.

DeserializeJsonArrayAsync<K>(HttpResponseMessage, CancellationToken)
DeserializeJsonAsync<K>(HttpResponseMessage, JsonTypeInfo<K>, CancellationToken)
DeserializeJsonAsync<K>(HttpResponseMessage, CancellationToken)
DeserializeJsonLoadSerializedAsync<K>(HttpResponseMessage, JsonTypeInfo<K>, CancellationToken)

Special deserialization method for responses from endpoints with ?content=serialize that wrap the actual object in an additional layer with the object name as the property name, e.g. { "Channel": { ... } }. This is required to properly handle dynamic properties on channels/devices/etc that conform to a different model from JSON type info for the base entity. This would cause
deserialization to fail if we tried to deserialize directly to the target type.

DeserializeJsonLoadSerializedAsync<K>(HttpResponseMessage, CancellationToken)

Special deserialization method for responses from endpoints with ?content=serialize that wrap the actual object in an additional layer with the object name as the property name, e.g. { "Channel": { ... } }. This is required to properly handle dynamic properties on channels/devices/etc that conform to a different model from JSON type info for the base entity. This would cause
deserialization to fail if we tried to deserialize directly to the target type.

GetChannelPropertiesAsync(Driver, CancellationToken)

Returns the channel properties for the specified driver in the Kepware server.

GetChannelPropertiesAsync(string, CancellationToken)
GetDevicePropertiesAsync(Driver, CancellationToken)

Returns the device properties for the specified driver in the Kepware server.

GetDevicePropertiesAsync(string, CancellationToken)

Returns the device properties for the specified driver in the Kepware server.

GetSupportedDriversAsync(CancellationToken)

Returns a list of all supported drivers from the Kepware server.

InsertItemAsync<T>(T, NamedEntity?, CancellationToken)

Inserts an item in the Kepware server.

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

Inserts an item in the Kepware server.

InsertItemsAsync<T, K>(List<K>, int, NamedEntity?, CancellationToken)

Inserts a list of items in the Kepware server.

InsertItemsDetailedAsync<T, K>(List<K>, int, NamedEntity?, CancellationToken)
LoadChannelPropertiesAsync(string, CancellationToken)
LoadCollectionAsync<T>(NamedEntity, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)

Loads a collection of entities of type T asynchronously by its owner from the Kepware server.

LoadCollectionAsync<T>(string?, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)

Loads a collection of entities of type T asynchronously by its owner from the Kepware server.

LoadCollectionAsync<T, K>(NamedEntity, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)

Loads a collection of entities of type T asynchronously by its owner from the Kepware server.

LoadCollectionAsync<T, K>(IEnumerable<string>, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)

Loads a collection of entities of type T asynchronously by its endpoint from the Kepware server.

LoadCollectionAsync<T, K>(string?, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)

Loads a collection of entities of type T asynchronously by its owner from the Kepware server.

LoadCollectionByEndpointAsync<T, K>(string, CancellationToken)
LoadDevicePropertiesAsync(string, CancellationToken)
LoadEntityAsync<T>(IEnumerable<string>, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)

Loads an entity of type T asynchronously by its owner from the Kepware server.

LoadEntityAsync<T>(string, NamedEntity, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)

Loads an entity of type T asynchronously by its name and owner from the Kepware server.

LoadEntityAsync<T>(string?, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)

Loads an entity of type T asynchronously by its name from the Kepware server.

LoadEntityByEndpointAsync<T>(string, bool, CancellationToken)
LoadSupportedDriversAsync(CancellationToken)
UpdateItemAsync<T>(string, T, T, CancellationToken)
UpdateItemAsync<T>(T, T?, CancellationToken)

Updates an item in the Kepware server.

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

Updates an item in the Kepware server.

UpdateItemsAsync<T, K>(List<(K item, K? oldItem)>, NamedEntity?, CancellationToken)

Updates a list of items in the Kepware server.

UpdateItemsDetailedAsync<T, K>(List<(K item, K? oldItem)>, NamedEntity?, CancellationToken)