Created
September 4, 2012 20:29
-
-
Save thecopy/3626106 to your computer and use it in GitHub Desktop.
This file contains 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
public static class Bootstrapper | |
{ | |
internal static IKernel Kernel = null; | |
internal static NinjectDependencyResolver NinjectDependencyResolver = null; | |
public static void StrapTheBoot() | |
{ | |
var kernel = new StandardKernel(); | |
kernel.Bind(typeof(IGenericRepository<>)) | |
.To(typeof(GenericRepository<>)) | |
.InRequestScope(); | |
kernel.Bind<IControllUserRepository>() | |
.To<ControllUserRepository>() | |
.InRequestScope(); | |
kernel.Bind<IMessageQueueService>() | |
.To<MessageQueueService>() | |
.InSingletonScope(); | |
kernel.Bind<IPluginService>() | |
.To<PluginService>() | |
.InSingletonScope(); | |
Kernel = kernel; | |
NinjectDependencyResolver = new NinjectDependencyResolver(kernel); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment