예제 #1
0
 internal sealed record OptionArgs(
     SourcePath SourcePath,
     DestinationDirectory DestinationDirectory,
     DryRun DryRun,
     KeepGoing KeepGoing,
     SkipDateSubdirectory SkipDateSubdirectory,
     Overwrite Overwrite);
예제 #2
0
                public Logic(KeepGoing <T> stage) : base(stage.Shape)
                {
                    // Called when the output port has received a pull, and therefore ready to emit an element, i.e. GraphStageLogic.Push()
                    // is now allowed to be called on this port.
                    SetHandler(stage.Shape.Outlet, onPull: () =>
                    {
                        if (IsClosed(stage.Shape.Inlet))
                        {
                            Push(stage.Shape.Outlet, _lastElement);
                        }
                        else
                        {
                            Pull(stage.Shape.Inlet);
                        }
                    });

                    SetHandler(stage.Shape.Inlet, onPush: () =>
                    {
                        _lastElement = Grab(stage.Shape.Inlet);
                        Push(stage.Shape.Outlet, _lastElement);
                    }, onUpstreamFinish: () => { });
                }