Class NotSupportedChannelWriter
[Obsolete("This feature will be removed in the next major version. See https://steeltoe.io/docs/v3/obsolete for details.")]
public class NotSupportedChannelWriter : ChannelWriter<IMessage>
- Inheritance
-
NotSupportedChannelWriter
- Inherited Members
Methods
TryComplete(Exception)
Attempts to mark the channel as being completed, meaning no more data will be written to it.
public override bool TryComplete(Exception error = null)
Parameters
error
ExceptionAn Exception indicating the failure causing no more data to be written, or null for success.
Returns
- bool
true if this operation successfully completes the channel; otherwise, false if the channel could not be marked for completion, for example due to having already been marked as such, or due to not supporting completion. .
TryWrite(IMessage)
Attempts to write the specified item to the channel.
public override bool TryWrite(IMessage item)
Parameters
item
IMessageThe item to write.
Returns
WaitToWriteAsync(CancellationToken)
Returns a ValueTask<TResult> that will complete when space is available to write an item.
public override ValueTask<bool> WaitToWriteAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenA CancellationToken used to cancel the wait operation.
Returns
- ValueTask<bool>
A ValueTask<TResult> that will complete with a true result when space is available to write an item or with a false result when no further writing will be permitted.
WriteAsync(IMessage, CancellationToken)
Asynchronously writes an item to the channel.
public override ValueTask WriteAsync(IMessage item, CancellationToken cancellationToken = default)
Parameters
item
IMessageThe value to write to the channel.
cancellationToken
CancellationTokenA CancellationToken used to cancel the write operation.