Пример #1
0
        public static void Start(IMvcApplication application)
        {
            IServiceCollection services = InitializeServices();

            application.ConfigureServices(services);
            application.Configure();
            Server    server = new Server(Constants.ServerHostPort, services);
            MvcEngine engine = new MvcEngine(server);

            engine.Run();
        }
Пример #2
0
        public static void Start(IMvcApplication application)
        {
            IDependencyContainer container = new DependencyContainer();

            application.ConfigureServices(container);

            IHttpHandler controllerRouter = new ControllerRouter(container);

            application.Configure();

            Server server = new Server(HostingPort, new HttpRouteHandlingContext(controllerRouter, new ResourceRouter()));

            MvcEngine.Run(server);
        }