-
Notifications
You must be signed in to change notification settings - Fork 391
Obsolete GlobalConfiguration #616
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
Conversation
CultureInfo properties not writable in all .NET targets.
I think we should probably be using CurrentCulture, not CurrentUICulture. At least for the number formatting. Maybe CurrentUICulture is more appropriate for the abbreviations? I found an interesting quote here:
|
Yes, that matches how I remember it when reading up on that a long time ago. CurrentCulture for numbers, CurrentUICulture for abbreviations and other texts tied to language/culture. I'm happy to address this in v5, but for this PR I think it's out of scope? |
Agreed! |
Fixes #600 .
So it can be more easily removed in v5.
Thread.CurrentThread.CurrentUICulture
as backing valueThread.CurrentThread.CurrentUICulture
directlyThis is kind of a breaking change. Before it would initialize to
CurrentUICulture
upon first static access toGlobalConfiguration
and that value would no longer match per-thread - but rather be globally static across threads. With this PR, it would instead match .NET's per-thread setup - which one could argue is a bug or a feature that we didn't - but since GlobalConfiguration was introduced in v4 in December and I don't think many/anyone relies on this initialize once behavior, I vote to take this in now.