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

                SetHandler(_stage.Out, this);
            }
예제 #2
0
파일: Unfold.cs 프로젝트: yfer/akka.net
            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);
                });
            }