Exemplo n.º 1
0
 /// <summary>
 /// Generates the string to represent the parameter
 /// </summary>
 /// <param name="configuration">Current configuration</param>
 /// <param name="parameter">Command whose string to generate</param>
 /// <returns>Parameter help string</returns>
 protected virtual string GenerateParameterString(Configuration configuration, CommandParameter parameter)
 {
     return(String.Format("  {0,-20}{1}{2}",
                          $"{configuration.LongParameterPrefix}{parameter.Name}{(!String.IsNullOrEmpty(parameter.ShortName) ? ", " + configuration.ShortParameterPrefix + parameter.ShortName : String.Empty)}",
                          !String.IsNullOrEmpty(parameter.Description) ? EnsureEndOfText(parameter.Description, true) : Resources.Help_NoDescription,
                          parameter.HasDefaultValue ? String.Format(Resources.Help_DefaultValue, parameter.DefaultValue) : String.Empty));
 }