Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Add constructor with a culture to RouteValueProvider #5336

Closed
rynowak opened this issue Sep 28, 2016 · 2 comments
Closed

Add constructor with a culture to RouteValueProvider #5336

rynowak opened this issue Sep 28, 2016 · 2 comments

Comments

@rynowak
Copy link
Member

rynowak commented Sep 28, 2016

In the event that you want to decide to treat route values as culture-sensitive, you have to duplicate a lot of code. Our other IValueProvider implementations accept a CultureInfo in the constructor.

See my answer here, route values are an outlier with respect to this question.

@jburgard
Copy link

Added a constructor with culture info. I wasn't sure if you wanted to add CultureInfo to the existing constructor. With the new constructor, I didn't need to modify several test classes such as DefaultModelBindingContextTest, RouteValueProviderTest and TestValueProvider.

Do you prefer a single constructor with the addition of CultureInfo, which includes updating the associated tests and factory?

@rynowak
Copy link
Member Author

rynowak commented Oct 17, 2016

It needs to be a new constructor.

This one is already public, changing it would potentially break code written against 1.0.X.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants