Exemplo n.º 1
0
        IConfigurableListParameter <IFluentArgsBuilder <Action <IReadOnlyList <TNextParam> >, Func <IReadOnlyList <TNextParam>, Task> >, TNextParam> IFluentArgsBuilder.ListParameter <TNextParam>(string name, params string[] moreNames)
        {
            var nextBuilder = new StepBuilder <Action <IReadOnlyList <TNextParam> >, Func <IReadOnlyList <TNextParam>, Task> >();

            return(new ListParameterBuilder <IFluentArgsBuilder <Action <IReadOnlyList <TNextParam> >, Func <IReadOnlyList <TNextParam>, Task> >, TNextParam>(
                       ListParameterBuilt, nextBuilder, Name.ValidateAndBuild(name, moreNames)));

            void ListParameterBuilt(ListParameter listParameter) =>
            nextBuilder.Step = new ListParameterStep(Step, listParameter);
        }
Exemplo n.º 2
0
        public IConfigurablePositionalArgument <IPositionalArgumentFluentArgsBuilder <Action <TParam>, Func <TParam, Task> >, TParam> PositionalArgument <TParam>()
        {
            var nextBuilder = new StepBuilder <Action <TParam>, Func <TParam, Task> >();

            return(new PositionalArgumentBuilder <IPositionalArgumentFluentArgsBuilder <Action <TParam>, Func <TParam, Task> >, TParam>(
                       PositionalArgumentBuilt, nextBuilder));

            void PositionalArgumentBuilt(PositionalArgument positionalArgument) =>
            nextBuilder.Step = new PositionalArgumentStep(Step, positionalArgument);
        }
Exemplo n.º 3
0
        IConfigurableParameter <IFluentArgsBuilder <Action <TNextParam>, Func <TNextParam, Task> >, TNextParam> IFluentArgsBuilder.Parameter <TNextParam>(string name, params string[] moreNames)
        {
            var nextBuilder = new StepBuilder <Action <TNextParam>, Func <TNextParam, Task> >();

            return(new ParameterBuilder <IFluentArgsBuilder <Action <TNextParam>, Func <TNextParam, Task> >, TNextParam>(
                       ParameterBuilt, nextBuilder, Name.ValidateAndBuild(name, moreNames)));

            void ParameterBuilt(Parameter parameter) =>
            nextBuilder.Step = new ParameterStep(Step, parameter);
        }