Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

verbs with same or options

オープン
#935 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
22/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
csharp, fsharp
領域
cli

調査の方向性

F# の例と、issue に示されている ParseArguments<SerializeOptions, DeserializeOptions>(argv) の呼び出しから始めます。継承された CommonOptions および Verb 属性がどのように処理されるかを追跡し、共有オプション型と verb 固有の情報がサポートされているかを判断します。このケースに対する動作が明確に決定され、issue で要求されている使用方法がサポートされるか、サポートされないことが明示的に文書化されれば完了です。

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

説明

Hello, I would like to ask you, whether there can be considered having some verbs with similar or even same options? That is, when the option classes have some relations like inheritance or they are based on same type in F#. Is there possibility to have somehow Parsed with additional info related to verb itself - like verb string or verb attribute?

An example in F#

open CommandLine

type CommonOptions = {
    [<Option('c', "connectionString", Required = true, HelpText = "MongoDB connection string.")>]
    ConnectionString: string
    [<Option('n', "dbCollection", Required = true, HelpText = "Database and collection name in the format 'databaseName.collectionName'.")>]
    DbCollection: string
    [<Option('d', "dir", Required = true, HelpText = "Directory path for serialization or deserialization.")>]
    Directory: string
    [<Option('b', "batchSize", Default = 1000, HelpText = "Batch size for processing.")>]
    BatchSize: int
    [<Option('s', "skip", Default = 0, HelpText = "Number of chunks to skip.")>]
    Skip: int
}
[<Verb("dump", HelpText = "Serialize (dump) a MongoDB collection to a json.gz file.")>]
type SerializeOptions = CommonOptions

[<Verb("restore", HelpText = "Deserialize (restore) a json.gz file to a MongoDB collection.")>]
type DeserializeOptions = CommonOptions

Then the classic handling as described in the main page
let result = Parser.Default.ParseArguments<SerializeOptions, DeserializeOptions>(argv) ...
won't work (matches with NotParsed).

主要言語
C#
スター
4.8k
フォーク
478
PR マージ指標
30日以内にマージされた PR はありません

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

commandlineparser/commandline のほかの issue

commandlineparser/commandline の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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