commandlineparser / commandlineparser/commandline
Selecting ONLY ONE OPTION in a Group
- 主要語言
- 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
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
Start by tracing how the Group setting is handled for the four TimeFrameOptions properties and determine whether it supports exactly one selected option. Done means the requested behavior is clearly defined and the four-option example has a verified success path for one option and a clear result when none or multiple options are selected.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp
- 領域
- cli
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100