Exemplo n.º 1
0
                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));
                    });
                }
Exemplo n.º 2
0
 public Logic(StartTimed <T> stage) : base(stage.Shape)
 {
     _stage = stage;
     SetHandler(stage.Outlet, this);
     SetHandler(stage.Inlet, this);
 }