Skip to content

Instantly share code, notes, and snippets.

@alistair
Created February 27, 2015 00:30
Show Gist options
  • Save alistair/6122084de3c8d49069cc to your computer and use it in GitHub Desktop.
Save alistair/6122084de3c8d49069cc to your computer and use it in GitHub Desktop.
public interface IAmAFeature {
public void Blah();
}
public interface WelcomeEmailFeature {
public void Blah() {
// Send email with no jobs.
}
}
public interface ExperimentWithWelcomeEmailContainingJobRecommendations {
public void Blah() {
// Send email with jobs.
}
// Sorry im going to write this using scalaisms as im lazy
public static class NinjectExtensions {
public void ToToggled<TL, TR>(this IBindingSyntax binding, string feature) {
Toggle(feature) match {
case Left => binding.To(typeof(TL));
case Right => binding.To(typeof(TR));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment