편집

다음을 통해 공유


ChannelWriter<T> Class

Definition

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

T

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

Inheritance
ChannelWriter<T>

Constructors

ChannelWriter<T>()

Initializes an instance of the ChannelWriter<T> class.

Methods

Complete(Exception)

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

Equals(Object)

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

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)
TryComplete(Exception)

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

TryWrite(T)

Attempts to write the specified item to the channel.

WaitToWriteAsync(CancellationToken)

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

WriteAsync(T, CancellationToken)

Asynchronously writes an item to the channel.

Applies to