void IInitializable <IApplicationContext> .Initialized(IApplicationContext context)
 {
     if (_currentApp != null)
     {
         _httpServerConfiguration.Configure(_container.Kernel, _currentApp);
     }
 }
Exemplo n.º 2
0
        public void Configuration(IAppBuilder app)
        {
            var config = new HttpConfiguration();

            HttpServerConfiguration.Configure(config);
            app.UseWebApi(config);
        }
        internal void Configuration(IAppBuilder app)
        {
            var config = new HttpConfiguration();

            HttpServerConfiguration.Configure(config);
            Container = (config.DependencyResolver as MyDependencyResolver).GetContainer() as SimpleIocContainer;
            app.UseWebApi(config);
        }
Exemplo n.º 4
0
        public SelfHostedServer()
        {
            var config = new HttpSelfHostConfiguration(BaseAddress);

            HttpServerConfiguration.Configure(config);
            // ReSharper disable once PossibleNullReferenceException
            Container = (config.DependencyResolver as MyDependencyResolver).GetContainer() as SimpleIocContainer;
            server    = new HttpSelfHostServer(config);
            server.OpenAsync().Wait();
        }
Exemplo n.º 5
0
        public InMemoryServer()
        {
            var config = new HttpConfiguration();

            HttpServerConfiguration.Configure(config);
            // ReSharper disable once PossibleNullReferenceException
            Container = (config.DependencyResolver as MyDependencyResolver).GetContainer() as SimpleIocContainer;
            var server = new HttpServer(config);

            messageInvoker = new HttpMessageInvoker(new InMemoryHttpContentSerializationHandler(server));
        }
 protected void Application_Start()
 {
     HttpServerConfiguration.Configure(GlobalConfiguration.Configuration);
 }