示例#1
0
文件: Timed.cs 项目: ziez/akka.net
                public override void OnPush()
                {
                    var element = Grab(_stage.Inlet);

                    if (_stage._matching(element))
                    {
                        var d = UpdateInterval();
                        if (_matched > 1)
                        {
                            _stage._onInterval(d);
                        }
                    }

                    Push(_stage.Outlet, element);
                }
示例#2
0
文件: Timed.cs 项目: yfer/akka.net
                public Logic(TimedIntervall <T> stage) : base(stage.Shape)
                {
                    SetHandler(stage.Outlet, onPull: () => Pull(stage.Inlet));
                    SetHandler(stage.Inlet, onPush: () =>
                    {
                        var element = Grab(stage.Inlet);
                        if (stage._matching(element))
                        {
                            var d = UpdateInterval();
                            if (_matched > 1)
                            {
                                stage._onInterval(d);
                            }
                        }

                        Push(stage.Outlet, element);
                    });
                }