/// <summary> /// Configure a positional argument with a single value. /// </summary> /// <typeparam name="TArg">Argument type.</typeparam> /// <param name="getExpr"> /// Getter expression describing where the value is stored. /// </param> /// <returns></returns> public Positional <TConf, TArg> HasPositionalArgument <TArg>( Expression <Func <TConf, TArg> > getExpr) { var positional = new Positional <TConf, TArg>(this, GetDefinitionFromExpression(getExpr)); FluentConfig.Add(positional); return(positional); }
/// <summary> /// Configure a named argument with multiple values. /// </summary> /// <typeparam name="TArg">Argument type.</typeparam> /// <param name="getExpr"> /// Getter expression describing where the values are stored. /// </param> /// <returns></returns> public NamedList <TConf, TArg> HasNamedArgumentList <TArg>( Expression <Func <TConf, TArg> > getExpr) { var named = new NamedList <TConf, TArg>(this, GetDefinitionFromExpression(getExpr)); FluentConfig.Add(named); return(named); }