public static void Main(string[] args)
        {
            var dependencyMap       = new Dictionary <Type, Type>();
            var dependencyContainer = new DependencyContainer(dependencyMap);

            dependencyContainer.RegisterDependency <IHashService, HashService>();
            dependencyContainer.RegisterDependency <IUserService, UserService>();
            dependencyContainer.RegisterDependency <IAlbumService, AlbumService>();
            dependencyContainer.RegisterDependency <ITrackService, TrackService>();
            dependencyContainer.RegisterDependency <IUserCookieService, UserCookieService>();

            Mapper.Initialize(cfg =>
            {
                cfg.AddProfile <IRunesProfile>();
            });

            var handlingContext = new HttpRouteHandlingContext(
                new ControllerRouter(dependencyContainer),
                new ResourceRouter());

            Server server = new Server(8000, handlingContext);
            var    engine = new MvcEngine();

            engine.Run(server);
        }
        static void Main(string[] args)
        {
            var dependencyContainer = new DependencyContainer();
            var handlingContext     = new HttpRouteHandlingContext(
                new ControllerRouter(dependencyContainer),
                new ResourceRouter());
            Server server = new Server(80, handlingContext);

            MvcEngine.Run(server);
        }
Exemple #3
0
        public static void Main()
        {
            var dependencyMap       = new Dictionary <Type, Type>();
            var dependencyContainer = new DependencyContainer(dependencyMap);

            dependencyContainer.RegisterDependency <IHashService, HashService>();
            dependencyContainer.RegisterDependency <IUsersService, UsersService>();
            var    handlingContext = new HttpRouteHandlingContext(new ControllerRouter(dependencyContainer), new ResourceRouter());
            Server server          = new Server(80, handlingContext);
            var    engine          = new MvcEngine();

            engine.Run(server);
        }
Exemple #4
0
        static void Main(string[] args)
        {
            var dependancyContainer = new DependencyContainer();

            dependancyContainer.RegisterDependancy <IDummyService, DummyService>();

            var handlingContext = new HttpRouteHandlingContext(
                new ControllerRouter(dependancyContainer),
                new ResourceRouter());

            Server server = new Server(8808, handlingContext);

            MvcEngine.Run(server);
        }
Exemple #5
0
        public static void Start(IMvcApplication application)
        {
            IDependencyContainer container = new DependencyContainer();

            application.ConfigureServices(container);

            var controllerRouter = new HttpRouteHandlingContext(new ControllerRouter(container), new ResourceRouter());

            application.Configure();

            Server server = new Server(HostingPort, controllerRouter);

            server.Run();
        }
Exemple #6
0
        static void Main(string[] args)
        {
            //ServerRoutingTable serverRoutingTable = new ServerRoutingTable();
            //var handler = new HttpHandler(serverRoutingTable);
            //ConfigureRouting(serverRoutingTable);


            //Server server = new Server(80, handler);

            //server.Run();
            var dependencyContainer = new DependencyContainer();

            dependencyContainer.RegisterDependency <IHashService, HashService>();
            dependencyContainer.RegisterDependency <IUsersService, UsersService>();

            var    handlingContext = new HttpRouteHandlingContext(new ControllerRouter(dependencyContainer), new ResourceRouter());
            Server server          = new Server(80, handlingContext);
            var    engine          = new MvcEngine();

            engine.Run(server);
        }