-
-
Notifications
You must be signed in to change notification settings - Fork 103
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make converters injectable and respect culture #117
Conversation
Codecov Report
@@ Coverage Diff @@
## master #117 +/- ##
==========================================
+ Coverage 84.64% 86.89% +2.24%
==========================================
Files 46 44 -2
Lines 1146 1190 +44
Branches 159 164 +5
==========================================
+ Hits 970 1034 +64
+ Misses 128 106 -22
- Partials 48 50 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just the one comment on Enum handling but all the rest is looking good to me.
Only other thing that I have a small issue (mostly an aesthetics thing and not something I would explicitly want changing unless you wanted to) is the DefaultServicesAreRegistered tests... that to me is screaming out to be a theory test taking in the Service and implementation types as arguments.
@tocsoft I updated the parser to allow custom enum types also fixed some boxing allocations caused by the parser/converter API Agree re the test but left it ugly as-is for now as I didn't want to end up potentially fighting Xunit skipping theory data values because it thinks they're all the same. Time is precious! 馃槃 |
Prerequisites
Description
Apologies in advance, this touches a lot of files. Coverage is good though.
This is one of those breaking changes we unfortunately have to implement before V1
The current
CommandParser
was not injectable and also did not respect the current culture. Respecting culture is a required feature for using in many CMS implementations.By default the system will use
InvariantCulture
so there are no surprises for people upgrading but there is a switch in the middleware optionsUseInvariantParsingCulture
which allows using theCultureInfo.CurrentCulture
.Converters and Processors both required method signature changes to allow the update.
I also found and fixed two issues