Show / Hide Table of Contents

Struct Awaiter<TAwaiter, R>

Represents awaiter pattern for type TAwaiter with non- result.

Implements
INotifyCompletion
Namespace: DotNext.Runtime.CompilerServices
Assembly: DotNext.Reflection.dll
Syntax
public struct Awaiter<TAwaiter, R> : INotifyCompletion where TAwaiter : INotifyCompletion
Type Parameters
Name Description
TAwaiter

Any type implementing awaiter pattern

R

Type of asynchronous result

Constructors

| Improve this Doc View Source

Awaiter(TAwaiter)

Initializes a new generic awaiter object.

Declaration
public Awaiter(TAwaiter awaiter)
Parameters
Type Name Description
TAwaiter awaiter

Underlying awaiter object.

Properties

| Improve this Doc View Source

IsCompleted

Gets a value that indicates whether the asynchronous task has completed.

Declaration
public bool IsCompleted { get; }
Property Value
Type Description
Boolean

Methods

| Improve this Doc View Source

GetResult()

Ends the wait for the completion of the asynchronous task.

Declaration
public R GetResult()
Returns
Type Description
R

The result of the completed task.

| Improve this Doc View Source

GetResult(TAwaiter)

Ends the wait for the completion of the asynchronous task.

Declaration
public static R GetResult(in TAwaiter awaiter)
Parameters
Type Name Description
TAwaiter awaiter

An object that waits for the completion of an asynchronous task.

Returns
Type Description
R

The result of the completed task.

Operators

| Improve this Doc View Source

Implicit(Awaiter<TAwaiter, R> to TAwaiter)

Extracts underlying awaiter object from this wrapper.

Declaration
public static implicit operator TAwaiter(in Awaiter<TAwaiter, R> awaiter)
Parameters
Type Name Description
Awaiter<TAwaiter, R> awaiter

Generic awaiter object.

Returns
Type Description
TAwaiter

Implements

INotifyCompletion

Extension Methods

ExpressionBuilder.Const<T>(T)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX