private static object GetOptionSyntax (BaseOptionAttribute option) { if (option is VerbOptionAttribute) return option.LongName; else if (option.ShortName != null) { if (option.LongName != null) return $"--{option.LongName}, -{option.ShortName}"; else return $"-{option.ShortName}"; } else if (option.LongName != null) return $"--{option.LongName}"; else return ""; }
private static object[] OptionNameAndHelp (BaseOptionAttribute option) => new[] { new Div { Margin = new Thickness(1, 0, 1, 1), Color = Yellow, MinWidth = 14 } .AddChildren(GetOptionSyntax(option)), new Div { Margin = new Thickness(1, 0, 1, 1) } .AddChildren(option.HelpText), };