Example #1
0
        /// <summary>
        /// Gets price information for a variation as a Price object. You can get the monetary price from the UnitPrice member.
        /// </summary>
        /// <param name="pricing">The variation.</param>
        /// <param name="market">The market.</param>
        /// <returns></returns>
        public static Price GetPrice(this IPricing pricing, IMarket market)
        {
            if (pricing == null)
            {
                return(null);
            }

            IMarket currentMarket = market;

            if (market == null)
            {
                currentMarket = _currentMarket.Service.GetCurrentMarket();
            }

            return(pricing.GetPrices(injectedPriceLoader.Service).FirstOrDefault(x => x.MarketId == currentMarket.MarketId));
        }
Example #2
0
 public static Price GetPrice(IPricing pricing)
 {
     return(pricing.GetPrices(injectedPriceLoader.Service).FirstOrDefault(x => x.MarketId == injectedMarketService.Service.GetCurrentMarket().MarketId));
 }
Example #3
0
 protected Price GetPrice(IPricing pricing)
 {
     return(pricing.GetPrices(PricingLoader).FirstOrDefault(x => x.MarketId == CurrentMarket.GetCurrentMarket().MarketId));
 }