Exemplo n.º 1
0
        private HttpServer PrepareServer()
        {
            HttpConfiguration config = new HttpConfiguration();

            config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;

            Bootstrapper bootstrapper = new Bootstrapper();

            bootstrapper.Initialize(NinjectWebCommon.CreateKernel);
            config.DependencyResolver = NinjectWebCommon.GetResolver();
            WebApiConfig.Register(config);
            config.EnsureInitialized();

            return(new HttpServer(config));
        }