Show / Hide Table of Contents

Class NotifyCompletion<TAwaiter>

Represents base concept of awaiter pattern.

Inheritance
Object
NotifyCompletion<TAwaiter>
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: DotNext.Runtime.CompilerServices
Assembly: DotNext.Reflection.dll
Syntax
[BeforeFieldInit(false)]
public static class NotifyCompletion<TAwaiter>

    where TAwaiter : INotifyCompletion
Type Parameters
Name Description
TAwaiter

Any type implementing awaiter pattern.

Remarks

This concept doesn't provide methods to obtain task result.

Methods

| Improve this Doc View Source

IsCompleted(TAwaiter)

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

Declaration
public static bool IsCompleted(in TAwaiter awaiter)
Parameters
Type Name Description
TAwaiter awaiter

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

Returns
Type Description
Boolean

true if the task has completed; otherwise, false.

| Improve this Doc View Source

OnCompleted(TAwaiter, Action)

Schedules the continuation action that's invoked when the instance completes.

Declaration
public static void OnCompleted(in TAwaiter awaiter, Action continuation)
Parameters
Type Name Description
TAwaiter awaiter

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

Action continuation

The action to invoke when the operation completes.

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