Performance improvement

This commit is contained in:
Mbucari 2023-07-02 22:23:29 -06:00
parent 83402028fd
commit db2b10d2a4
3 changed files with 47 additions and 47 deletions

View file

@ -16,18 +16,14 @@ internal class HelpVerb
/// <summary>
/// Create a base <see cref="HelpText"/> for <see cref="LibationCli"/>
/// </summary>
public static HelpText CreateHelpText()
public static HelpText CreateHelpText() => new HelpText
{
var auto = new HelpText
{
AutoVersion = false,
AutoHelp = false,
Heading = $"LibationCli v{LibationScaffolding.BuildVersion.ToString(3)}",
AdditionalNewLineAfterOption = true,
MaximumDisplayWidth = 80
};
return auto;
}
AutoVersion = false,
AutoHelp = false,
Heading = $"LibationCli v{LibationScaffolding.BuildVersion.ToString(3)}",
AdditionalNewLineAfterOption = true,
MaximumDisplayWidth = 80
};
/// <summary>
/// Get the <see cref="HelpType"/>'s <see cref="HelpText"/>
@ -43,8 +39,8 @@ internal class HelpVerb
}
else
{
helpText.AddDashesToOption = true;
helpText.AutoHelp = true;
helpText.AddDashesToOption = true;
helpText.AddOptions(result);
}
return helpText;