Skip to content

Instantly share code, notes, and snippets.

@melkio
Created October 1, 2012 13:59
Show Gist options
  • Save melkio/3811944 to your computer and use it in GitHub Desktop.
Save melkio/3811944 to your computer and use it in GitHub Desktop.
Order
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