verbs with same or options
還沒有人認領這個 Issue。
評估
研究方向
從 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
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
commandlineparser/commandline 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
commandlineparser/commandline#951 · 1 則留言 ·
-
難度 1/5 1 小時以內 新手友好度 70/100
commandlineparser/commandline#880 · 2 個 reaction ·
-
難度 5/5 一週以上 新手友好度 45/100
commandlineparser/commandline#952 ·
-
難度 3/5 1-2 天 新手友好度 35/100
commandlineparser/commandline#948 ·
-
難度 5/5 一週以上 新手友好度 35/100
commandlineparser/commandline#947 ·
查看 commandlineparser/commandline 的全部 Issue
相似的 Issue
-
core dependencies
難度 1/5 1 小時以內 新手友好度 80/100
-
bug frontend good first issue
難度 2/5 1-3 小時 新手友好度 75/100
-
NavigationViewItemAutomationPeer implements IInvokeProvider but never advertises the Invoke pattern 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
unoplatform/uno#24629 ·
-
agentic-workflows Needs: Triage :mag: State: In-PR
難度 2/5 1-3 小時 新手友好度 70/100
-
Down / Waiting for removal
難度 2/5 1-3 小時 新手友好度 70/100