Exemplo n.º 1
0
        /// <summary>站点启动代码,支持HTTP和NON-HTTP</summary>
        public static void AppInitialize()
        {
            AutofacHostFactory.Container = ServiceResolver.Initialize(new Startup());

            AutofacHostFactory.Container.Resolve <ProfilingBuilder>().Initialize();

            GlobalConfiguration.Configuration.DependencyResolver = new AutofacWebApiDependencyResolver(AutofacHostFactory.Container);
        }