class · System.Threading.Tasks

Task<T>

public class System.Threading.Tasks.Task<T> : System.Threading.Tasks.Task

A task with a value: what an async function that returns one gives.

Tipo
class
Espacio de nombres
System.Threading.Tasks
Ensamblado
System.Core
Acceso
public
Archivo fuente
Tasks.ant

Parámetros de tipo

NombreRestricciones
Tcualquier tipo

Herencia

Clases base
Any Task Task<T>

Propiedades

property Result: T
#

read-only

The value, once done (runs the scheduler until then; throws the error if it failed).

Métodos

method SetResult(value: T) -> void
#

Done with value.

method GetResult() -> T
#

What await gives once the task has finished: its value (or its error, thrown).

static method FromResult(value: T) -> System.Threading.Tasks.Task<T>
#

static

A task done with value.

Campos

field result: T
#

inherited

Miembros heredados (24)

Código fuente

Task<T> en Larva HIR, descompilado a partir de su Larva HIR.

System.Threading.Tasks.Task`1.hir
// A task with a value: what an async function that returns one gives.
public class System.Threading.Tasks.Task<T> : System.Threading.Tasks.Task
{
    field result: T
    // Done with `value`.
    method SetResult(value: T) -> void
    // What `await` gives once the task has finished: its value (or its error, thrown).
    method GetResult() -> T
    // A task done with `value`.
    static method FromResult(value: T) -> System.Threading.Tasks.Task<T>
    // The value, once done (runs the scheduler until then; throws the error if it failed).
    property Result: T
}
Esc