Created
October 1, 2012 13:59
-
-
Save melkio/3811944 to your computer and use it in GitHub Desktop.
Order
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Order | |
{ | |
private Guid _userId; | |
private Guid _storeId; | |
private DateTime _dispatchDate; | |
... | |
public class Factory | |
{ | |
public Order CreateNewOrder(Action<OrderConfiguration> configurator) | |
{ | |
var configuration = new OrderConfiguration(); | |
configurator(configuration); | |
var order = new Order(); | |
order._userId = configuration.UserId; | |
order._storeId = configuration.StoreId; | |
order._dispatchDate = configuration.DispatchDate; | |
return order; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment