コード例 #1
0
 protected void Application_Start()
 {
     AreaRegistration.RegisterAllAreas();
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     SimpleInjectorContainer.Initializer();
     AutoMapperConfig.Configure();
 }
コード例 #2
0
ファイル: Startup.cs プロジェクト: GengiScrum/Projeto_NFe
        public void Configuration(IAppBuilder app)
        {
            SimpleInjectorContainer.Initializer();
            AutoMapperInitializer.Initialize();
            HttpConfiguration config = new HttpConfiguration()
            {
                DependencyResolver = new SimpleInjectorWebApiDependencyResolver(SimpleInjectorContainer.ContainerInstance)
            };

            WebApiConfig.Register(config);
            app.UseWebApi(config);
        }
コード例 #3
0
        public void Configuration(IAppBuilder app)
        {
            SimpleInjectorContainer.Initializer();
            //AutoMapperInitializer.Initialize();
            HttpConfiguration config = new HttpConfiguration()
            {
                DependencyResolver = new SimpleInjectorWebApiDependencyResolver
                                         (SimpleInjectorContainer.ContainerInstance)
            };

            WebApiConfig.Register(config);

            OAuthConfig.ConfigureOAuth(app);

            config.MessageHandlers.Add(new CustomLogHandler());

            app.UseWebApi(config);
        }