Добавьте файлы проекта.

This commit is contained in:
2025-11-27 09:10:58 +03:00
parent 730fd30d87
commit c1f50fcca0
32 changed files with 1154 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
namespace ArgumentsToolkit.Help;
/// <summary>
/// Форматтер для генерации справки в формате HTML.
/// </summary>
public class HtmlHelpFormatter : IHelpFormatter
{
public string Format(HelpModel model)
{
var lines = new List<string> { $"<h2>{model.Title}</h2>", "<ul>" };
foreach (var entry in model.Entries)
{
string required = entry.Required ? " (обязательный)" : "";
lines.Add($"<li><b>--{entry.Name} / -{entry.ShortName}</b>: {entry.Description} ({entry.TypeName}{required})</li>");
}
lines.Add("</ul>");
return string.Join(Environment.NewLine, lines);
}
}