Editar

Compartilhar via


ChannelReader<T> Class

Definition

Provides a base class for reading from a channel.

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

Type Parameters

T

Specifies the type of data that may be read from the channel.

Inheritance
ChannelReader<T>

Constructors

ChannelReader<T>()

Initializes an instance of the ChannelReader<T> class.

Properties

CanCount

Gets a value that indicates whether Count is available for use on this ChannelReader<T> instance.

CanPeek

Gets a value that indicates whether TryPeek(T) is available for use on this ChannelReader<T> instance.

Completion

Gets a Task that completes when no more data will ever be available to be read from this channel.

Count

Gets the current number of items available from this channel reader.

Methods

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)
ReadAllAsync(CancellationToken)

Creates an IAsyncEnumerable<T> that enables reading all of the data from the channel.

ReadAsync(CancellationToken)

Asynchronously reads an item from the channel.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
TryPeek(T)

Attempts to peek at an item from the channel.

TryRead(T)

Attempts to read an item from the channel.

WaitToReadAsync(CancellationToken)

Returns a ValueTask<TResult> that will complete when data is available to read.

Applies to