Commit Graph

10 Commits

Author SHA1 Message Date
damianedwards 306d71ef43 Moved some things around:
- Options are now given to strategies
- Options only contains properties relevant to the middleware itself. Strategies can have their own properties, e.g. AcceptLanguageHeaderRequestCultureStrategy limits the number of values in the header to try
- Strategies now derive from common base class and validate against the options, e.g. app specified supported cultures
- Renamed RequestLocalizationMiddlewareOptions to RequestLocalizationOptions
- Fixed missing doc comments
2015-05-11 15:28:50 -07:00
damianedwards 9834a27728 Culture names are now limited to a known list:
- Added tool to generate a set of known culture names from the OS/Fx
- CultureInfoCache is now limited to only caching/returning cultures from the known list
- #6
2015-05-11 12:58:18 -07:00
damianedwards ca4b85e19f Added missing doc comments 2015-05-07 18:19:54 -07:00
damianedwards 944c84bc5d Implemented CookieRequestCultureStrategy & other changes:
- Updated sample to enable setting/clearing cultures via cookie
- Cache CultureInfo construction as it's not built into .NET Core
- Cache RequestCulture construction as they're immutable anyway and created lots per app if the middleware is running
- Fix issue where by invalid culture names were not handled (it crashed)
- Handle the pesky favicon.ico request from browsers
- Ignore .vs folder
2015-05-07 18:11:10 -07:00
damianedwards ec8ede5d8a Fixed missing resource caching issue in ResourceManagerStringLocalizer 2015-05-07 10:32:59 -07:00
damianedwards 3dc0d40f7d Added a sample & fixed some issues it found 2015-05-06 18:09:59 -07:00
damianedwards b11f7d51c3 Bunch of changes:
- Implemented pluggable strategies for determining request culture
- Added NotNull on public APIs
- Added support for a default request culture
- Added options class for configuring the middleware
- Improved the query string logic to support separate formatting & language cultures
- Implemented the logic for accept-language header
- Added more doc comments
2015-05-06 16:51:23 -07:00
damianedwards acd643660a Added missing descriptions 2015-05-06 10:53:25 -07:00
damianedwards 52f7aa9540 Rename file 2015-05-05 23:32:44 -07:00
damianedwards 9eede89418 Initial commit 2015-05-05 23:27:25 -07:00