File tree Expand file tree Collapse file tree
src/IGLib.Core/Console/Validation/DefaultFormatProvider Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,15 @@ public class DefaultFormatProviderSelector
1616 public static IDefaultFormatProviderSelector Global { get ; private set ; }
1717 = new DefaultFormatProviderSelectorInvariantCulture ( ) ;
1818
19+ public static void SetGlobal ( IDefaultFormatProviderSelector selector )
20+ {
21+ if ( selector == null )
22+ {
23+ throw new ArgumentNullException ( nameof ( selector ) , "The global selector of default format provider cannot be set to null." ) ;
24+ }
25+ Global = selector ;
26+ }
27+
1928 /// <summary>Returns the appropriate <see cref="IFormatProvider"/> according to the specified (suggested)
2029 /// <paramref name="specifiedFormatProvider"/> (that can be null) and the specified <paramref name="defaultSelector"/>,
2130 /// which provides the default <see cref="IFormatProvider"/> when the <paramref name="specifiedFormatProvider"/>
You can’t perform that action at this time.
0 commit comments