We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 413dd5f commit b83608dCopy full SHA for b83608d
src/IGLib.Core/Console/Validation/DefaultFormatProvider/Simple/FormatProviderDefaults.cs
@@ -0,0 +1,22 @@
1
+
2
+using System;
3
+using System.Globalization;
4
+
5
+namespace IGLib;
6
7
+public static class FormatProviderDefaults
8
+{
9
+ public static IFormatProvider Global { get; private set; } = CultureInfo.InvariantCulture;
10
11
+ public static void SetGlobal(IFormatProvider formatProvider)
12
+ {
13
+ if (formatProvider == null)
14
+ throw new ArgumentNullException(nameof(formatProvider));
15
16
+ Global = formatProvider;
17
+ }
18
19
+ public static IFormatProvider Resolve(IFormatProvider? specifiedFormatProvider)
20
+ => specifiedFormatProvider ?? Global;
21
+}
22
0 commit comments