Show / Hide Table of Contents

Struct Awaitable<T, TAwaiter, TResult>

Represents awaitable concept type for the task type with non-void result.

Inherited Members
ValueType.Equals(Object)
ValueType.GetHashCode()
ValueType.ToString()
Object.Equals(Object, Object)
Object.GetType()
Object.ReferenceEquals(Object, Object)
Namespace: DotNext.Runtime.CompilerServices
Assembly: DotNext.Reflection.dll
Syntax
public struct Awaitable<T, TAwaiter, TResult>

    where TAwaiter : ICriticalNotifyCompletion
Type Parameters
Name Description
T

The constrained type.

TAwaiter

The type constrained with concept Awaiter<TAwaiter>.

TResult

The type of asynchronous result.

Constructors

| Improve this Doc View Source

Awaitable(T)

Wraps value of type T into awaitable value compatible with await expression.

Declaration
public Awaitable(T awaitable)
Parameters
Type Name Description
T awaitable

Underlying awaitable object.

Methods

| Improve this Doc View Source

GetAwaiter()

Gets awaiter used to await asynchronous result represented by type T.

Declaration
public Awaiter<TAwaiter, TResult> GetAwaiter()
Returns
Type Description
Awaiter<TAwaiter, TResult>

An awaiter instance.

| Improve this Doc View Source

GetAwaiter(T)

Gets awaiter used to await asynchronous result represented by type T.

Declaration
public static TAwaiter GetAwaiter(in T obj)
Parameters
Type Name Description
T obj

The object representing asynchronous computing.

Returns
Type Description
TAwaiter

An awaiter instance.

Operators

| Improve this Doc View Source

Implicit(Awaitable<T, TAwaiter, TResult> to T)

Gets underlying awaitable object.

Declaration
public static implicit operator T(in Awaitable<T, TAwaiter, TResult> awaitable)
Parameters
Type Name Description
Awaitable<T, TAwaiter, TResult> awaitable

Awaitable object container.

Returns
Type Description
T

Extension Methods

Sequence.Skip<TEnumerator, T>(ref TEnumerator, Int32)
ExpressionBuilder.Const<T>(T)

See Also

TAP
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX