commandlineparser / commandlineparser/commandline

verbs with same or options

Đang mở
#935 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C#
Star
4.8k
Fork
478
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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 = {
[]
ConnectionString: string
[]
DbCollection: string
[]
Directory: string
[]
BatchSize: int
[]
Skip: int
}
[]
type SerializeOptions = CommonOptions

[]
type DeserializeOptions = CommonOptions

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start with the F# example and the ParseArguments(argv) call shown in the issue. Trace how inherited CommonOptions and Verb attributes are handled, and determine whether shared option types and verb-specific information are supported. Done requires a clearly decided behavior for this case, with the issue's requested usage either supported or explicitly documented as unsupported.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
csharp, fsharp
Lĩnh vực
cli
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
22/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.