Mercurial > pub > ImplabNet
diff Implab/PromiseExtensions.cs @ 259:7d52dc684bbd v3
PollingComponent: implemented correct stopping
author | cin |
---|---|
date | Fri, 13 Apr 2018 03:57:39 +0300 |
parents | d82909310094 |
children |
line wrap: on
line diff
--- a/Implab/PromiseExtensions.cs Fri Apr 13 00:44:57 2018 +0300 +++ b/Implab/PromiseExtensions.cs Fri Apr 13 03:57:39 2018 +0300 @@ -211,6 +211,15 @@ })); } + public static PromiseAwaiter GetAwaiter(this IPromise that) { + Safe.ArgumentNotNull(that, nameof(that)); + return new PromiseAwaiter(that); + } + + public static PromiseAwaiter<T> GetAwaiter<T>(this IPromise<T> that) { + Safe.ArgumentNotNull(that, nameof(that)); + return new PromiseAwaiter<T>(that); + } } }