Ejemplo n.º 1
0
        protected void Application_Start()
        {
            GlobalConfiguration.Configure(WebApiConfig.Register);
            IocConfigInitialize.Init(ScopeType.Http, new IConfig[] { new IocConfig(), });
            var logger = Ioc.Create <ILog>();

            logger.Info("初始化信息成功");
            GlobalConfiguration.Configuration.DependencyResolver = new AutofacWebApiDependencyResolver(Ioc.GetContainer());
        }
Ejemplo n.º 2
0
 static void Init()
 {
     IocConfigInitialize.Init(ScopeType.None, new IConfig[] { new IocConfig(), });
 }