commandlineparser / commandlineparser/commandline

Parser constructor is missing overload with ParserSettings argument

オープン
#800 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
4.8k
フォーク
478
PR マージ指標
30日以内にマージされた PR はありません

説明

I wanted to write this code, because this seems to be the most intuitiv way:
```csharp
ParserSettings settings = new()
{
AutoHelp = true,
AutoVersion = true,
CaseInsensitiveEnumValues = true,
CaseSensitive = false,
IgnoreUnknownArguments = true,
ParsingCulture = System.Globalization.CultureInfo.InvariantCulture,
};
Parser parser = new(settings);
```

But it doesn't work, because Parser doesn't have constructor with ParserSettings argument.

This also doesn't work:
```csharp
Parser parser = new() { Settings = settings };
```
because `Settings` is read-only.

So, there should be this constructor overload to initialize Parser with existing settings.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。