Skip to content

Instantly share code, notes, and snippets.

@dtryon
Created March 27, 2013 16:36
Show Gist options
  • Save dtryon/5255794 to your computer and use it in GitHub Desktop.
Save dtryon/5255794 to your computer and use it in GitHub Desktop.
public class Order
{
private Customer customer;
private ISendEmail sendEmail;
public Order(Customer customer, ISendEmail sendEmal)
{
this.customer = customer;
this.sendEmail = sendEmail;
}
// snip
public void Place()
{
// place order
sendEmail.ConfirmationTo(customer.EmailAddress);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment