Пример #1
0
        public static void Start(IMvcApplication application)
        {
            IServerRoutingTable serverRoutingTable = new ServerRoutingTable();
            IHttpSessionStorage httpSessionStorage = new HttpSessionStorage();
            IServiceProvider    serviceProvider    = new ServiceProvider();

            serviceProvider.Add <ILogger, ConsoleLogger>();

            application.ConfugureServices(serviceProvider);

            AutoRegisterRoutes(application, serverRoutingTable, serviceProvider);
            application.Configure(serverRoutingTable);
            Server server = new Server(8001, serverRoutingTable, httpSessionStorage);

            server.Run();
        }