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); }
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); }); }