FluentValidation.Tests.CultureScope.SetDefaultCulture C# (CSharp) Method

SetDefaultCulture() public static method

public static SetDefaultCulture ( ) : void
return void
		public static void SetDefaultCulture() {
			ValidatorOptions.ResourceProviderType = null;
#if !CoreCLR
			Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
			Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
#else
			CultureInfo.CurrentCulture = new CultureInfo("en-US");
			CultureInfo.CurrentUICulture = new CultureInfo("en-US");
#endif
		}
	}

Usage Example

Example #1
0
        public DependencyInjectionTests(ITestOutputHelper output, WebAppFixture <StartupForDependencyInjectionTests> webApp)
        {
            CultureScope.SetDefaultCulture();

            _output = output;
            _webApp = webApp;
        }
All Usage Examples Of FluentValidation.Tests.CultureScope::SetDefaultCulture