Table of Contents

Method DeleteDeviceAsync

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

DeleteDeviceAsync(Device, CancellationToken)

Deletes the specified device.

public Task<bool> DeleteDeviceAsync(Device device, CancellationToken cancellationToken = default)

Parameters

device Device

The device to delete.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<bool>

A task that represents the asynchronous operation. The task result contains a boolean indicating whether the deletion was successful.

Exceptions

ArgumentNullException

Thrown when the device is null.

DeleteDeviceAsync(string, string, CancellationToken)

Deletes the device with the specified name in the specified channel.

public Task<bool> DeleteDeviceAsync(string channelName, string deviceName, CancellationToken cancellationToken = default)

Parameters

channelName string

The name of the channel to which the device belongs.

deviceName string

The name of the device to delete.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<bool>

A task that represents the asynchronous operation. The task result contains a boolean indicating whether the deletion was successful.

Exceptions

ArgumentException

Thrown when the channel name or device name is null or empty.