public MoneyFormatter(IOrganizationMoneyFormatInfo organization, IMoneyFormatInfo record, MoneyAttributeMetadata attributeMetadata, CultureInfo culture = null) : this(organization, record, attributeMetadata.Precision, attributeMetadata.PrecisionSource, attributeMetadata.IsBaseCurrency.GetValueOrDefault(), culture) { if (attributeMetadata == null) { throw new ArgumentNullException("attributeMetadata"); } }
public MoneyFormatter(IOrganizationMoneyFormatInfo organization, IMoneyFormatInfo record, int?attributePrecision = null, int?precisionSource = null, bool isBaseCurrency = false, CultureInfo culture = null) : base(organization, culture) { if (record == null) { throw new ArgumentNullException("record"); } _attributePrecision = attributePrecision; _precisionSource = precisionSource; _record = record; _isBaseCurrency = isBaseCurrency; }
public BaseCurrencyMoneyFormatter(IOrganizationMoneyFormatInfo organization, CultureInfo culture = null) { if (organization == null) { throw new ArgumentNullException("organization"); } Organization = organization; _culture = culture ?? CultureInfo.CurrentCulture; _currencySymbol = new Lazy <string>(GetCurrencySymbol, LazyThreadSafetyMode.None); _currencySymbolComesFirst = new Lazy <bool>(GetCurrencySymbolComesFirst, LazyThreadSafetyMode.None); _precision = new Lazy <int>(GetPrecision, LazyThreadSafetyMode.None); }