예제 #1
0
        public Server(IFileStorage fileStorage, ushort port)
        {
            FileStorage = fileStorage;
            this.port   = port;
            routes      = new List <IRoute>();
            handlers    = new List <IRequestHandler>
            {
                new RouteRequestHandler(),
                new FileRequestHandler(),
                new FileNotFoundRequestHandler()
            };

            DefaultPath      = "index.htm";
            MimeTypeProvider = new DefaultMimeTypeProvider();
            LoggerFactory    = new Log4netLoggerFactory();
            ActionFactory    = new ActionFactory();
        }
예제 #2
0
        public Server(IFileStorage fileStorage, ushort port)
        {
            FileStorage = fileStorage;
            this.port = port;
            routes = new List<IRoute>();
            handlers = new List<IRequestHandler>
                       {
                           new RouteRequestHandler(),
                           new FileRequestHandler(),
                           new FileNotFoundRequestHandler()
                       };

            DefaultPath = "index.htm";
            MimeTypeProvider = new DefaultMimeTypeProvider();
            LoggerFactory = new Log4netLoggerFactory();
            ActionFactory = new ActionFactory();
        }