public void ProcessingOrder(ICustomerCreditLimitReached customerCreditLimitReached) { // make sure the customer is not over the limit if (customerCreditLimitReached.IsSatisfiedBy(this)) { throw new CustomerLimitReachedException(CustomerId, OrderId, TotalValue.HasValue ? TotalValue.Value : 0); } RaiseEvent(new OrderProcessed { OrderStatus = Models.OrderStatus.Processing.ToString() }); }
public void ProcessingOrder(ICustomerCreditLimitReached customerCreditLimitReached) { // make sure the customer is not over the limit if (customerCreditLimitReached.IsSatisfiedBy(this)) throw new CustomerLimitReachedException(CustomerId, OrderId, TotalValue.HasValue ? TotalValue.Value : 0); RaiseEvent(new OrderProcessed{OrderStatus = Models.OrderStatus.Processing.ToString()}); }