Beispiel #1
0
        public MyAwaiter(YieldAwaitable awaitable)
        {
            var awaiter = awaitable.GetAwaiter();

            _onCompleted       = awaiter.OnCompleted;
            _unsafeOnCompleted = awaiter.UnsafeOnCompleted;
            _getResult         = awaiter.GetResult;
            _isCompleted       = () => awaiter.IsCompleted;
        }
Beispiel #2
0
 public ConfiguredYieldAwaiter GetAwaiter() =>
 new ConfiguredYieldAwaiter(_awaitable.GetAwaiter(), _continueOnCapturedContext);