Auf Englisch lesen Bearbeiten

Freigeben über


ValueTask Constructors

Definition

Overloads

ValueTask(Task)

Initializes a new instance of the ValueTask class using the supplied task that represents the operation.

ValueTask(IValueTaskSource, Int16)

Initializes a new instance of the ValueTask class using the supplied IValueTaskSource object that represents the operation.

ValueTask(Task)

Source:
ValueTask.cs
Source:
ValueTask.cs
Source:
ValueTask.cs

Initializes a new instance of the ValueTask class using the supplied task that represents the operation.

C#
public ValueTask(System.Threading.Tasks.Task task);

Parameters

task
Task

The task that represents the operation.

Applies to

.NET 10 und andere Versionen
Produkt Versionen
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1

ValueTask(IValueTaskSource, Int16)

Source:
ValueTask.cs
Source:
ValueTask.cs
Source:
ValueTask.cs

Initializes a new instance of the ValueTask class using the supplied IValueTaskSource object that represents the operation.

C#
public ValueTask(System.Threading.Tasks.Sources.IValueTaskSource source, short token);

Parameters

source
IValueTaskSource

An object that represents the operation.

token
Int16

An opaque value that is passed through to the IValueTaskSource.

Applies to

.NET 10 und andere Versionen
Produkt Versionen
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1