Table of Contents

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

item IotItem

The IoT Item to delete.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<bool>

A boolean indicating whether the deletion was successful.

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

serverTag string

The dot-delimited server tag name (e.g., "Channel1.Device1.Tag1").

parentAgent IotAgent

The parent agent that owns the IoT Item.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<bool>

A boolean indicating whether the deletion was successful.

Exceptions

ArgumentException

Thrown when the server tag is null or empty.

ArgumentNullException

Thrown when the parent agent is null.