Exemple #1
0
            public Logic(UnfoldAsync <TState, TElement> stage) : base(stage.Shape)
            {
                _stage = stage;
                _state = _stage.State;

                SetHandler(_stage.Out, this);
            }
Exemple #2
0
            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);
                });
            }