Method DeleteChannelAsync
- Namespace
- Kepware.Api.ClientHandler
- Assembly
- Kepware.Api.dll
DeleteChannelAsync(Channel, CancellationToken)
Deletes the specified channel.
public Task<bool> DeleteChannelAsync(Channel channel, CancellationToken cancellationToken = default)
Parameters
channel
ChannelThe channel to delete.
cancellationToken
CancellationTokenThe 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 channel is null.
DeleteChannelAsync(string, CancellationToken)
Deletes the channel with the specified name.
public Task<bool> DeleteChannelAsync(string channelName, CancellationToken cancellationToken = default)
Parameters
channelName
stringThe name of the channel to delete.
cancellationToken
CancellationTokenThe 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 is null or empty.