Skip to content

Instantly share code, notes, and snippets.

@shoter
Created March 30, 2018 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shoter/3cd06180ddc6bb747278ab206b55dece to your computer and use it in GitHub Desktop.
Save shoter/3cd06180ddc6bb747278ab206b55dece to your computer and use it in GitHub Desktop.
NinjectableJob
public abstract class NinjectableJob : IJob
{
protected IKernel kernel;
public void Execute()
{
using(kernel = new StandardKernel())
{
NinjectSingletonCommon.RegisterTypes(kernel);
execute();
}
}
protected abstract void execute();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment