commandlineparser / commandlineparser/commandline

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

未關閉
#151 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C#
星號
4.8k
分支
478
PR 合併指標
30 天內沒有已合併 PR

描述

**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

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。