-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add the Parse and TryParse static methods #85
base: master
Are you sure you want to change the base?
Conversation
Looks great. Are you sure that |
@hankovich no I don't 😅, It looked correct to me at first, usually it's undesired spaces at edges of the strings Wdyt? |
@lucasteles I think If trimming will be added, it makes sense to trim in constructors, not inside parsing methods. And I'm not sure everyone needs they input to be trimmed |
Makes sense to me, I will update the the PR |
@hankovich updated |
Thank you, @lucasteles ! I thought I must be using this library wrong since I have to manually add the static @andrewlock , any chance of getting this or something similar merged into the release? |
I implemented it in my fork |
Add the
.Parse
and.TryParse
static methods on all base templates.They are common and expected methods for value types.
.TryParse
is especially good because enables the use of custom types on ASP.NET Minimal Api routesfix #30