public void Configuration(IAppBuilder app)
 {
     GlobalConfiguration.Configure(config => {
         ApiConfiguration.Install(config, app);
         app.UseWebApi(config);
     });
 }
示例#2
0
 public void Configuration(IAppBuilder app)
 {
     GlobalConfiguration.Configure(config =>
     {
         config.DependencyResolver = new UnityDependencyResolver(UnityConfiguration.GetContainer());
         ApiConfiguration.Install(config, app);
     });
 }
        public void Configuration(IAppBuilder app)
        {
            var config = new HttpConfiguration();

            config.DependencyResolver = new UnityDependencyResolver(UnityConfiguration.GetContainer());
            ApiConfiguration.Install(config, app);
            app.UseWebApi(config);
        }
示例#4
0
 public void Setup()
 {
     testServer = TestServer.Create(app =>
     {
         var config = new HttpConfiguration();
         config.DependencyResolver = new UnityDependencyResolver(UnityConfiguration.GetContainer());
         ApiConfiguration.Install(config, app);
         app.UseWebApi(config);
     });
 }
示例#5
0
 public void Configuration(IAppBuilder app)
 {
     GlobalConfiguration.Configure(config =>
     {
         var container = UnityConfiguration.GetContainer();
         InitLogging(container);
         config.DependencyResolver = new UnityDependencyResolver(container);
         ApiConfiguration.Install(config, app);
     });
 }