Created
April 1, 2015 22:41
-
-
Save JayBazuzi/75317447ad8bb81a336c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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