public Logic(StartTimed <T> stage) : base(stage.Shape) { var started = false; SetHandler(stage.Outlet, onPull: () => Pull(stage.Inlet)); SetHandler(stage.Inlet, onPush: () => { if (!started) { stage._timedContext.Start(); started = true; } Push(stage.Outlet, Grab(stage.Inlet)); }); }
public Logic(StartTimed <T> stage) : base(stage.Shape) { _stage = stage; SetHandler(stage.Outlet, this); SetHandler(stage.Inlet, this); }