Beispiel #1
0
        public static DependencyResolver CreateDepenencyResolver()
        {
            Framework.Core.DependencyResolver dependencyResolver = new Framework.Core.DependencyResolver();
            dependencyResolver.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
            new ApplicationServicesRegistrar(dependencyResolver).RegisterServices();

            dependencyResolver.Install(
                new ControllersInstaller()
                );

            return(dependencyResolver);
        }
Beispiel #2
0
        public static void Setup()
        {
            Framework.Core.DependencyResolver dependencyResolver = CreateDepenencyResolver();

            GlobalConfiguration.Configuration.DependencyResolver = new CastleDependencyResolver(dependencyResolver.IocContainer.Kernel);
        }