public PlainTextReceiptFormatter(ICurrencyFormatter currencyFormatter) { _total = 0; _taxes = 0; _currencyFormatter = currencyFormatter; _items = new List <PrintableItem>(); }
public void Awake() { _instance = this; collectionSorter = new BasicCollectionSorter(); currencyFormatter = new BasicCurrencyFormatter(); _isUIWorldSpace = guiRoot.GetComponent <Canvas>().renderMode == RenderMode.WorldSpace; }
private void Start() { _formatter = currencyFormatterProvider.value; _betSettings = betSettingsProvider.value; _activeBetText = GetComponent <TMP_Text>(); _betSettings.onActiveBetChanged += handleActiveBetChanged; updateText(); }
private void Start() { _formatter = currencyFormatterProvider.value; _wallet = walletProvider.value; _balanceText = GetComponent <TMP_Text>(); _wallet.onBalanceChanged += handleBalanceChanged; updateText(); }
/// <summary> /// Creates a new globalization context. /// </summary> /// <param name="locale"> /// The globalization context locale. /// </param> /// <param name="domain"> /// The globalization context domain. /// </param> /// <param name="currencyRepository"> /// The globalization context currency repository. /// </param> /// <param name="messageRepository"> /// The globalization context message repository. /// </param> internal GlobalizationContext(ILocale locale, string domain, ICurrencyRepository currencyRepository, IMessageRepository messageRepository) { Locale = locale ?? throw new ArgumentNullException(nameof(locale)); Domain = domain ?? throw new ArgumentNullException(nameof(domain)); _currencyRepository = currencyRepository ?? throw new ArgumentNullException(nameof(currencyRepository)); _messageRepository = messageRepository ?? throw new ArgumentNullException(nameof(messageRepository)); _currencyFormatter = new CurrencyFormatter(); _dateTimeFormatter = new DateTimeFormatter(); _messageFormatter = new MessageFormatter(); _numberFormatter = new NumberFormatter(); }
public CurrencyFormatterUnitTest() { _currencyRepository = new CurrencyRepository(new EnvironmentCurrencyFactory()); _localeRepository = new LocaleRepository(new EnvironmentLocaleFactory()); _locale = _localeRepository.GetLocale("pt-PT"); _currency = _currencyRepository.GetDefaultCurrency(_locale); _alternativeCurrency = _currencyRepository.GetCurrency("USD"); _currencyFormatter = new CurrencyFormatter(); _alternativeCurrencyNumberFormatInfo = (NumberFormatInfo)_locale.Culture.NumberFormat.Clone(); _alternativeCurrencyNumberFormatInfo.CurrencyDecimalDigits = _alternativeCurrency.Scale; _alternativeCurrencyNumberFormatInfo.CurrencySymbol = _alternativeCurrency.Symbol; }
public void Awake() { _instance = this; collectionSorter = new BasicCollectionSorter(); currencyFormatter = new BasicCurrencyFormatter(); _isUIWorldSpace = guiRoot.GetComponent<Canvas>().renderMode == RenderMode.WorldSpace; }
public ShoppingCartLineJsonResult(IStorefrontContext storefrontContext, IModelProvider modelProvider, ISearchManager searchManager, IContext context, ICurrencyFormatter currencyFormatter) : base(storefrontContext, modelProvider, searchManager, context, currencyFormatter) { Assert.ArgumentNotNull(modelProvider, nameof(modelProvider)); this.ModelProvider = modelProvider; }
public void SetUp() { _currencyFormatter = Substitute.For <ICurrencyFormatter>(); _sut = new PlainTextReceiptFormatter(_currencyFormatter); }
private void Awake() { _formatter = currencyFormatterProvider.value; _depositInput = depositInputProvider.value; }
public OrderLineVariantRenderingModel(IStorefrontContext storefrontContext, ISearchManager searchManager, IContext context, IModelProvider modelProvider, IRendering rendering, ICurrencyFormatter currencyFormatter) : base(storefrontContext, searchManager, context, modelProvider, rendering, currencyFormatter) { }
public RUBTests() { formatter = CurrencyFormatterFactory.Build(Language.Russian, Currency.RUB); }
public ReceiptFormatter(ICurrencyFormatter currencyFormatter = null) { Currency = currencyFormatter ?? CurrencyFormatter.Default; }