public PromotionReward[] GetRewards() { var retVal = new PromotionReward[] { }; if (Children != null) { retVal = Children.OfType <IReward>().SelectMany(x => x.GetRewards()).ToArray(); } return(retVal); }
//Copy constructor protected PromotionReward(PromotionReward other) { Id = GetType().Name; IsValid = other.IsValid; Description = other.Description; CouponAmount = other.CouponAmount; Coupon = other.Coupon; CouponMinOrderAmount = other.CouponMinOrderAmount; Promotion = other.Promotion; }