public override uint GetPrice() { #if DEBUG WriteLine("SaleDecorator : GetPrice"); #endif return(BookPrice.GetPrice()); }
string GetStringProduct(IProduct product, ) { decimal total = (decimal)(product.GetAmount() * _price.GetPrice(product)); string text = product.GetName().PadRight(20, '.') + product.GetAmount() + " X " + _price.GetPrice(product) + " = " + total.ToString(); return(text); }
//TODO: may be "GetDefaultPrice" is a better name for the method public static IEnumerable <Price> GetPrice(this IPrice price) { if (null == price) { throw new ArgumentNullException("price"); } return(price.GetPrice((DateTime?)null)); }
/// <summary> /// 计算折后价 /// </summary> public double GetPrice(string discountType) { return(IPrice.GetPrice(Price)); }