commandlineparser / commandlineparser/commandline

Not meaningful error in case of options with same name

Aperta
#872 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C#
Stelle
4.8k
Fork
478
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Repro:
```csharp
class Options {
[Option('s', "storage", Required = true, HelpText = "Storage account name hosting metrics")]
public string StorageName { get; set; }

[Option('s', "key", Required = true, HelpText = "Key of given storage account")]
public string StorageKey { get; set; }
}
```

Error given is:
`System.InvalidOperationException: 'Sequence contains more than one matching element`

Suggested message:
`One of more options has the same name. Check attributes properties`

Thanks :)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.