|
2 | 2 | using System; |
3 | 3 | using System.Globalization; |
4 | 4 |
|
5 | | -namespace IGLib |
6 | | -{ |
7 | | - |
8 | | - /// <summary>Provides the default format provider (object of type <see cref="IFormatProvider"/>) |
9 | | - /// for cases where the format provider is not explicitly specified; e.g., in methods where |
10 | | - /// <see cref="IFormatProvider"/> is a parameter, but is not provided by the caller (parameter |
11 | | - /// is set to null).</summary> |
12 | | - /// <remarks><para>Usage example:</para> |
13 | | - /// <remarks>In constructors or methods that have <see cref="IFormatProvider"/> as parameter, also |
14 | | - /// provide <see cref="IDefaultFormatProviderSelector?"/> as parameter, and default it to null. |
15 | | - /// Then, within the constructor, check if fhe format provider parameter is null, and if yes, |
16 | | - /// set it to what the default format provider selector's |
17 | | - /// <see cref="DefaulltFormatProvider"/> returns. In applications, you can arrange for specific |
18 | | - /// <see cref="IDefaultFormatProviderSelector"/> to be injected in all such constructors.</remarks> |
19 | | - /// </remarks> |
20 | | - public class DefaultFormatProviderSelectorInvariantCulture : IDefaultFormatProviderSelector |
21 | | - { |
| 5 | +namespace IGLib; |
22 | 6 |
|
23 | | - public IFormatProvider DefaultFormatProvider => CultureInfo.InvariantCulture; |
24 | | - |
25 | | - } |
| 7 | +/// <summary>Provides the default format provider (object of type <see cref="IFormatProvider"/>) |
| 8 | +/// for cases where the format provider is not explicitly specified; e.g., in methods where |
| 9 | +/// <see cref="IFormatProvider"/> is a parameter, but is not provided by the caller (parameter |
| 10 | +/// is set to null).</summary> |
| 11 | +/// <remarks><para>Usage example:</para> |
| 12 | +/// <remarks>In constructors or methods that have <see cref="IFormatProvider"/> as parameter, also |
| 13 | +/// provide <see cref="IDefaultFormatProviderSelector?"/> as parameter, and default it to null. |
| 14 | +/// Then, within the constructor, check if fhe format provider parameter is null, and if yes, |
| 15 | +/// set it to what the default format provider selector's |
| 16 | +/// <see cref="DefaulltFormatProvider"/> returns. In applications, you can arrange for specific |
| 17 | +/// <see cref="IDefaultFormatProviderSelector"/> to be injected in all such constructors.</remarks> |
| 18 | +/// </remarks> |
| 19 | +public class DefaultFormatProviderSelectorInvariantCulture : IDefaultFormatProviderSelector |
| 20 | +{ |
26 | 21 |
|
| 22 | + /// <inheritdoc/> |
| 23 | + public IFormatProvider DefaultFormatProvider => CultureInfo.InvariantCulture; |
27 | 24 |
|
28 | 25 | } |
0 commit comments