public Logic(UnfoldAsync <TState, TElement> stage) : base(stage.Shape) { _stage = stage; _state = _stage.State; SetHandler(_stage.Out, this); }
public Logic(UnfoldAsync <TState, TElement> stage) : base(stage.Shape) { _stage = stage; _state = _stage.State; SetHandler(_stage.Out, onPull: () => { _stage.UnfoldFunc(_state) .ContinueWith(task => _asyncHandler(Result.FromTask(task)), TaskContinuationOptions.AttachedToParent); }); }