commandlineparser / commandlineparser/commandline

Would be good if there was a way to ignore whitespace around seperator characters when parsing an IEnumerable

Ouverte
#151 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C#
Étoiles
4.8k
Forks
478
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

**Issue by [ClerioVision](https://github.com/ClerioVision)**
_Monday Jul 24, 2017 at 13:41 GMT_
_Originally opened as https://github.com/gsscoder/commandline/issues/460_

----

I'm using the following option class to parse a list of Enum values separated by ":' characters

so my command line might look like

prog -s NI:GALVO_CHILLER:OTS:A3200

would be nice if I could make it look like this (for better readability)

prog -s NI : GALVO_CHILLER : OTS : A3200

----------------------------------------------------
Public Class CommandLineOptions

Public Enum SupressableDevices As Integer
NI
GALVO_CHILLER
LASER_CHILLER
DOCK_CAMERA
BACK_CAMERA
PLATFORM_SENSOR
OTS
LASER
A3200
End Enum

<[Option]("s"c, "Supress", Separator:=":"c, Required:=False, HelpText:="Devices to be supressed.")>
Public Property SupressedDevices As IEnumerable(Of SupressableDevices)

<[Option]("v"c, "verbose", HelpText:="Print details during execution")>
Public Property Verbose As Boolean

End Class

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.