Method SetDefaultProvider
SetDefaultProvider(ICurrencyDataProvider, CurrencyTypes)
Sets the registry that Default returns to a registry created from the specified currency data provider, i.e. the CLDR data provided by
the Singulink.Globalization.Currency.Cldr package. This method must be called at application startup before the default registry is first
accessed, i.e. before any currencies or monetary values are created that do not explicitly specify a registry.
Declaration
public static void SetDefaultProvider(ICurrencyDataProvider provider, CurrencyTypes types = CurrencyTypes.CurrentTender)
Parameters
| Type | Name | Description |
|---|---|---|
| ICurrencyDataProvider | provider | The currency data provider to load the registry from. The data is loaded the first time Default is accessed. |
| CurrencyTypes | types | The types of currencies to include in the default registry. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The default registry has already been created. |