Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeSpan option failing to parse with "bad format" #173

Closed
ericnewton76 opened this issue Nov 4, 2017 · 3 comments
Closed

TimeSpan option failing to parse with "bad format" #173

ericnewton76 opened this issue Nov 4, 2017 · 3 comments

Comments

@ericnewton76
Copy link
Member

Issue by georgiosd
Monday Oct 16, 2017 at 07:30 GMT
Originally opened as gsscoder/commandline#493


If defined a TimeSpan? property in my options and passed it as "00:30" from the commandline but it failed with "bad format".

Is this not supported?

@ericnewton76
Copy link
Member Author

Comment by SuperJMN
Sunday Oct 22, 2017 at 16:31 GMT


I'm having the same problem with a nullable enum.

@ErikSchierboom
Copy link

I'm having the same problem with a nullable enum.

Same here.

@nemec
Copy link
Contributor

nemec commented Nov 13, 2017

I think this is the root of the problem: https://weblogs.asp.net/pjohnson/Convert.ChangeType-doesn_2700_t-handle-nullables

Convert is not very extensible and was designed around a fixed set of types

The library uses Convert.ChangeType internally to convert from string which doesn't support nullable at all. We need to gut it and add support for ComponentModel/TypeConverter, which would also let developers add converters for custom types.

0xced added a commit to 0xced/commandline that referenced this issue Jan 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants