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>(T, CancellationToken)
Deletes an item from the Kepware server.
- DeleteItemAsync<T, K>(K, NamedEntity?, CancellationToken)
Deletes an item from the Kepware server.
- DeleteItemsAsync<T, K>(List<K>, NamedEntity?, CancellationToken)
Deletes a list of items from the Kepware server.
- DeserializeJsonLoadSerializedAsync<K>(HttpResponseMessage, JsonTypeInfo<K>, CancellationToken)
Special deserialization method for responses from endpoints with
?content=serializethat 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=serializethat 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.
- 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.
- LoadCollectionAsync<T>(NamedEntity, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)
Loads a collection of entities of type
Tasynchronously by its owner from the Kepware server.
- LoadCollectionAsync<T>(string?, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)
Loads a collection of entities of type
Tasynchronously by its owner from the Kepware server.
- LoadCollectionAsync<T, K>(NamedEntity, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)
Loads a collection of entities of type
Tasynchronously by its owner from the Kepware server.
- LoadCollectionAsync<T, K>(IEnumerable<string>, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)
Loads a collection of entities of type
Tasynchronously by its endpoint from the Kepware server.
- LoadCollectionAsync<T, K>(string?, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)
Loads a collection of entities of type
Tasynchronously by its owner from the Kepware server.
- LoadEntityAsync<T>(IEnumerable<string>, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)
Loads an entity of type
Tasynchronously by its owner from the Kepware server.
- LoadEntityAsync<T>(string, NamedEntity, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)
Loads an entity of type
Tasynchronously by its name and owner from the Kepware server.
- LoadEntityAsync<T>(string?, IEnumerable<KeyValuePair<string, string?>>?, CancellationToken)
Loads an entity of type
Tasynchronously by its name from the Kepware server.
- 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.