コード例 #1
0
            public async override Task Handle <TValue>(EffAwaiter <TValue> awaiter)
            {
                var result = MaybeEffectHandler.Run(awaiter.Eff);

                if (result.HasValue)
                {
                    awaiter.SetResult(result.Value);
                    var next = _continuation.MoveNext();
                    Result = MaybeEffectHandler.Run(next);
                }
            }
コード例 #2
0
        public override async Task Handle <TResult>(EffAwaiter <TResult> effect)
        {
            try
            {
                var result = await effect.Eff.Run(this);

                effect.SetResult(result);
            }
            catch (Exception ex)
            {
                await Log(ex, effect);

                throw;
            }
        }
コード例 #3
0
 public override async Task Handle<TResult>(EffAwaiter<TResult> effect)
 {
     var result = await effect.Eff.Run(this);
     effect.SetResult(result);
     await Log(result, effect);
 }