Beispiel #1
0
 public static void Initialize()
 {
     RootContainer        = new Container(new VkAppRegistry());
     StructureMapResolver = new StructureMapDependencyResolver(RootContainer);
     Resolver.SetResolver(StructureMapResolver);
     ServiceLocator.SetLocatorProvider(CreateServiceLocator);
 }
Beispiel #2
0
 /// <summary>
 /// Registers the <see cref="Catel.IoC.ServiceLocator" /> as dependency resolver for ASP.NET MVC.
 /// </summary>
 /// <param name="serviceLocator">The service locator. If <c>null</c>, the <see cref="ServiceLocator.Default"/> will be used.</param>
 public static void RegisterServiceLocatorAsDependencyResolver(IServiceLocator serviceLocator = null)
 {
     DependencyResolver.SetResolver(new IoC.DependencyResolver(serviceLocator));
 }
        public static void Initialise()
        {
            var container = BuildUnityContainer();

            DependencyResolver.SetResolver(new UnityDependencyResolver(container));
        }