Пример #1
0
        /// <summary>Disposes the Unity container when the application is shut down.</summary>
        public static void Shutdown()
        {
            var container = IoCConfig.GetConfiguredContainer();

            container.Dispose();
        }
Пример #2
0
        /// <summary>Integrates Unity when the application starts.</summary>
        public static void Start()
        {
            var resolver = new HierarchicalDependencyResolver(IoCConfig.GetConfiguredContainer());

            GlobalConfiguration.Configuration.DependencyResolver = resolver;
        }