Skip to content

Instantly share code, notes, and snippets.

@JayBazuzi
Created April 1, 2015 22:41
Show Gist options
  • Save JayBazuzi/75317447ad8bb81a336c to your computer and use it in GitHub Desktop.
Save JayBazuzi/75317447ad8bb81a336c to your computer and use it in GitHub Desktop.
class Foo
{
private readonly IEvents _events;
public Foo(IEvents events)
{
_events = events;
}
public interface IEvents
{
void ThatHappened(int i);
}
void That(int i)
{
_events.ThatHappened(i);
}
}
class FooEventsLogger : Foo.IEvents
{
public void ThatHappened(int i)
{
Log("That happened w/ {0}", i);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment