Beispiel #1
0
 public static void Initialize(HttpConfiguration config)
 {
     var container = Container;
     var mvc4Resolver = new UnityDependencyResolver(container);
     DependencyResolver.SetResolver(mvc4Resolver);
     var previousResolver = DependencyResolver.Current;
     var newResolver = new Code.UnityDependencyResolver(container, previousResolver);
     DependencyResolver.SetResolver(newResolver);
     config.DependencyResolver = new Unity.WebApi.UnityDependencyResolver(container);
 }
Beispiel #2
0
        public static void Initialize(HttpConfiguration config)
        {
            var container    = Container;
            var mvc4Resolver = new UnityDependencyResolver(container);

            DependencyResolver.SetResolver(mvc4Resolver);
            var previousResolver = DependencyResolver.Current;
            var newResolver      = new Code.UnityDependencyResolver(container, previousResolver);

            DependencyResolver.SetResolver(newResolver);
            config.DependencyResolver = new Unity.WebApi.UnityDependencyResolver(container);
        }