Skip to content
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

Reduce dependency on CultureInfo.Current and Thread Current culture. #82

Open
adamhathcock opened this issue Sep 10, 2020 · 0 comments
Open

Comments

@adamhathcock
Copy link

Thanks for this, I'm using this now on a .NET Core 3 project and seems like it's working!

I was attempting to use Money.TryParse which always uses Currency.CurrentCurrency which always throws because (I believe) .NET Core's current culture is always invariant.

Using the overload of TryParse that specifies a currency works but I'd rather the parse try to figure it out (sometimes).

Anyway, I went down a rabbit hole trying to have it not throw for CurrentCurrency but that seems to break a lot as well as the unit tests fail as it relies a lot on CurrentCulture and/or CurrentCurrency.

Does 2.0 have plans to (nearly) remove this default? .NET 5 is almost here and I'd like to help remove some legacy stuff like current culture and reliance on legacy frameworks.

Let me know your plan and I can find some time to help out!

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

No branches or pull requests

1 participant