commandlineparser / commandlineparser/commandline

Selecting ONLY ONE OPTION in a Group

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

説明

From my understanding, in a group there needs to be atleast one or more than one option specified. In my use case, for the class given below, I want to select **only ONE option (not more)**. Is there any way to do this?

```csharp
internal class TimeFrameOptions
{
[Option(shortName: 's', longName: "seconds", Group = "timeframe", HelpText = "")]
public int Seconds { get; set; }

[Option(shortName: 'm', longName: "minutes", Group = "timeframe", HelpText = "")]
public int Minutes { get; set; }

[Option(shortName: 'h', longName: "hours", Group = "timeframe", HelpText = "")]
public int Hours { get; set; }

[Option(shortName: 'd', longName: "days", Group = "timeframe", HelpText = "")]
public int Days { get; set; }
}
```
Thanks

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

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

評価

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

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

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