commandlineparser / commandlineparser/commandline

ushort and short not supported

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

説明

```
class Options
{
[Option('p', "port", Required = false, HelpText = "port number")]
public int Port { get;set; }
}
```

If i change the type of Port to ushort or short I get an error when starting the program:

"ERROR(S):
Error setting value to option 'p, port': Check if Option or Value attribute values are set
properly for the given type."

Expected behavior:
1. clear error message that the type is not supported
2. support the types ushort and short

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

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

調査の方向性

C# Options の例で報告されたエラーを再現し、Port を int、ushort、short の間で変更します。オプション値の変換とエラー報告の経路を追跡します。ushort と short が動作するか、明確な未対応型メッセージを受け取るようになり、両方のケースをカバーするテストがあれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
cli
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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