ChannelWriter<T> ChannelWriter<T> ChannelWriter<T> ChannelWriter<T> Class


Provides a base class for writing to a channel.

generic <typename T>
public ref class ChannelWriter abstract
public abstract class ChannelWriter<T>
type ChannelWriter<'T> = class
Public MustInherit Class ChannelWriter(Of T)

Type Parameters


Specifies the type of data that may be written to the channel.



ChannelWriter<T>() ChannelWriter<T>() ChannelWriter<T>() ChannelWriter<T>()


Complete(Exception) Complete(Exception) Complete(Exception) Complete(Exception)

Mark the channel as being complete, meaning no more items will be written to it.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
TryComplete(Exception) TryComplete(Exception) TryComplete(Exception) TryComplete(Exception)

Attempts to mark the channel as being completed, meaning no more data will be written to it.

TryWrite(T) TryWrite(T) TryWrite(T) TryWrite(T)

Attempts to write the specified item to the channel.

WaitToWriteAsync(CancellationToken) WaitToWriteAsync(CancellationToken) WaitToWriteAsync(CancellationToken) WaitToWriteAsync(CancellationToken)

Returns a ValueTask<TResult> that will complete when space is available to write an item.

WriteAsync(T, CancellationToken) WriteAsync(T, CancellationToken) WriteAsync(T, CancellationToken) WriteAsync(T, CancellationToken)

Asynchronously writes an item to the channel.

Applies to