protected void SetupOption(
            IFluentCommandLineParser parser, string name, string description, string configSetting, Action <string> callback, bool isRequired = true)
        {
            var option             = parser.Setup <string>(name).WithDescription(description).Callback(callback);
            var configSettingValue = _settings.GetApplicationSetting(configSetting);

            if (!string.IsNullOrEmpty(configSettingValue))
            {
                option.SetDefault(configSettingValue);
            }
            else if (isRequired)
            {
                option.Required();
            }
        }
 /// <summary>
 /// Setup a new <see cref="ICommandLineOptionFluent{T}"/> using the specified short and long Option name.
 /// </summary>
 /// <param name="shortOption">The short name for the Option. This must not be <c>whitespace</c> or a control character.</param>
 /// <param name="longOption">The long name for the Option. This must not be <c>null</c>, <c>empty</c> or only <c>whitespace</c>.</param>
 /// <returns></returns>
 /// <exception cref="OptionAlreadyExistsException">
 /// A Option with the same <paramref name="shortOption"/> name or <paramref name="longOption"/> name already exists in the <see cref="IFluentCommandLineParser"/>.
 /// </exception>
 /// <exception cref="InvalidOptionNameException">
 /// Either <paramref name="shortOption"/> or <paramref name="longOption"/> are not valid. <paramref name="shortOption"/> must not be <c>whitespace</c>
 /// or a control character. <paramref name="longOption"/> must not be <c>null</c>, <c>empty</c> or only <c>whitespace</c>.
 /// </exception>
 public ICommandLineOptionFluent <TProperty> As(char shortOption, string longOption)
 {
     return(_parser.Setup <TProperty>(shortOption, longOption)
            .Callback(AssignValueToPropertyCallback));
 }
 private void SetupString(char flag, Action <string> assignment)
 {
     _parser.Setup <string>(flag).Callback(assignment);
 }