Ejemplo n.º 1
0
 public static IRuleBuilderOptions <T, string> MustBeCurrencyCode <T>(
     this IRuleBuilder <T, string> ruleBuilder, ICurrencyProvider currencyProvider)
 {
     return(ruleBuilder
            .Must(value => currencyProvider.GetCurrencies().Contains(value))
            .WithMessage("Not a valid currency code"));
 }
Ejemplo n.º 2
0
 public IndexModel(ICurrencyProvider provider)
 {
     Currencies = provider.GetCurrencies();
 }
Ejemplo n.º 3
0
 public void Configure(CurrencyOptions options)
 {
     options.Currencies = _currencyProvider.GetCurrencies();
 }