static void Main(string[] args) { Customer customer = new Customer(50314, "MyCustomer"); var holder = new ValueHolder <IEnumerable <Order> >(OrdersDatabase.GetOrders); customer.SetValueHolder(holder); foreach (Order order in customer.GetOrders()) { // Do Something With Orders } }
public void SetValueHolder(ValueHolder <IEnumerable <Order> > orders) { Orders = orders; }