File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/HotChocolate/Core/test/Types.Analyzers.Tests Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 11using System . Collections . Immutable ;
22using System . Diagnostics . CodeAnalysis ;
3+ using System . Globalization ;
4+ using System . Runtime . CompilerServices ;
35using System . Text ;
46using System . Text . Encodings . Web ;
57using System . Text . Json ;
@@ -314,4 +316,16 @@ private static void AddDiagnosticsToSnapshot(
314316
315317 [ GeneratedRegex ( "MiddlewareFactories([a-z0-9]{32})" ) ]
316318 private static partial Regex MiddlewareFactoryHashRegex ( ) ;
319+
320+ internal static class ForceInvariantDefaultCultureModuleInitializer
321+ {
322+ [ ModuleInitializer ]
323+ internal static void Initialize ( )
324+ {
325+ // Compile errors are localized, so enforce a common default culture,
326+ // since otherwise the snapshot comparison may fail
327+ CultureInfo . DefaultThreadCurrentCulture = CultureInfo . InvariantCulture ;
328+ CultureInfo . DefaultThreadCurrentUICulture = CultureInfo . InvariantCulture ;
329+ }
330+ }
317331}
You can’t perform that action at this time.
0 commit comments