Пример #1
0
        /// <summary>
        /// Sets up the IOC Container loading modules from the Currently Executing Assembly
        /// </summary>
        public static void RegisterAssembly()
        {
            _resolver = new NinjectResolver(Assembly.GetExecutingAssembly());

            //This is where the actual hookup to the MVC Pipeline is done.
            DependencyResolver.SetResolver(_resolver);
        }
Пример #2
0
 /// <summary>
 /// Sets up the IOC using the Ninject Modules provided
 /// </summary>
 /// <param name="modules">Modules</param>
 public static void RegisterModules(NinjectModule[] modules)
 {
     _resolver = new NinjectResolver(modules);
     DependencyResolver.SetResolver(_resolver);
 }