Bits.Tests.Delegates.OrderService.GetCurrentDiscountingAction C# (CSharp) Method

GetCurrentDiscountingAction() public method

public GetCurrentDiscountingAction ( ) : Action
return Action
            public Action<Order> GetCurrentDiscountingAction()
            {
                Action<Order> discountAction;

                if (DateTime.Now.Day % 2 == 0)
                {
                    discountAction = (order) =>
                        {
                            if (order.Total > 50)
                                order.Total -= 10;
                        };
                }
                else
                {
                    discountAction = (order) =>
                        {
                            if (order.Total > 30)
                                order.Total -= 5;
                        };
                }

                return discountAction;
            }
Delegates.OrderService