Method DeleteIotItemAsync
- Namespace
- Kepware.Api.ClientHandler
- Assembly
- Kepware.Api.dll
DeleteIotItemAsync(IotItem, CancellationToken)
Deletes the specified IoT Item.
public Task<bool> DeleteIotItemAsync(IotItem item, CancellationToken cancellationToken = default)
Parameters
itemIotItemThe IoT Item to delete.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Exceptions
- ArgumentNullException
Thrown when the item is null.
DeleteIotItemAsync(string, IotAgent, CancellationToken)
Deletes the IoT Item identified by the specified server tag under the given parent agent. The server tag is converted to the IoT Item name by replacing dots with underscores and stripping any leading underscore.
public Task<bool> DeleteIotItemAsync(string serverTag, IotAgent parentAgent, CancellationToken cancellationToken = default)
Parameters
serverTagstringThe dot-delimited server tag name (e.g., "Channel1.Device1.Tag1").
parentAgentIotAgentThe parent agent that owns the IoT Item.
cancellationTokenCancellationTokenThe cancellation token.
Returns
Exceptions
- ArgumentException
Thrown when the server tag is null or empty.
- ArgumentNullException
Thrown when the parent agent is null.