public SyborgHttpListenerAppHost(
            IWebServerConfiguration configuration,
            string externalUrl,
            int serverPortNumber,
            string applicationPath,
            IFileSystem fileSystem,
            IApplicationInfo applicationInfo,
            ITimeService timeService,
            IRazorViewRenderingEngine viewRenderingEngine,
            IFileMimeTypesMap fileMimeTypesMap,
            IWebServerController webServerController,
            IEnumerable <IWebRequestRoute> routes,
            IEnumerable <IWebPolicy> policies)
        {
            Contract.Requires(viewRenderingEngine != null);
            Contract.Requires(routes != null);
            Contract.Requires(policies != null);

            this.configuration       = configuration;
            this.externalUrl         = externalUrl;
            this.serverPortNumber    = serverPortNumber;
            this.applicationPath     = applicationPath;
            this.fileSystem          = fileSystem;
            this.applicationInfo     = applicationInfo;
            this.timeService         = timeService;
            this.viewRenderingEngine = viewRenderingEngine;
            this.fileMimeTypesMap    = fileMimeTypesMap;
            this.webServerController = webServerController;

            this.routes.AddRange(routes);
            this.policies.AddRange(policies);
        }
Example #2
0
        public HttpListenerWebContext(
            HttpListenerContext context,
            string applicationUrl,
            string applicationPath,
            IFileSystem fileSystem,
            IApplicationInfo applicationInfo,
            ITimeService timeService,
            IWebServerConfiguration configuration,
            IRazorViewRenderingEngine viewRenderingEngine,
            IFileMimeTypesMap fileMimeTypesMap)
        {
            Contract.Requires(context != null);
            Contract.Requires(context.Request != null);

            this.applicationPath     = applicationPath;
            this.context             = context;
            this.applicationUrl      = applicationUrl;
            this.fileSystem          = fileSystem;
            this.applicationInfo     = applicationInfo;
            this.timeService         = timeService;
            this.configuration       = configuration;
            this.viewRenderingEngine = viewRenderingEngine;
            this.fileMimeTypesMap    = fileMimeTypesMap;
            requestCookies           = new HttpListenerCookiesCollection(context.Request.Cookies);
        }
Example #3
0
 protected void Initialize(
     IWebServerConfiguration webServerConfiguration,
     IFileSystem fileSystem,
     IApplicationInfo applicationInfo,
     ITimeService timeService,
     IFileMimeTypesMap fileMimeTypesMap,
     IRazorViewRenderingEngine viewRenderingEngine)
 {
     this.webServerConfiguration = webServerConfiguration;
     this.fileSystem             = fileSystem;
     this.applicationInfo        = applicationInfo;
     this.timeService            = timeService;
     this.fileMimeTypesMap       = fileMimeTypesMap;
     this.viewRenderingEngine    = viewRenderingEngine;
 }
Example #4
0
 public TestHost(
     IWebServerConfiguration configuration,
     string externalUrl,
     int serverPortNumber,
     string applicationPath,
     IFileSystem fileSystem,
     IApplicationInfo applicationInfo,
     ITimeService timeService,
     IRazorViewRenderingEngine viewRenderingEngine,
     IFileMimeTypesMap fileMimeTypesMap,
     IWebServerController webServerController,
     IEnumerable <IWebRequestRoute> routes,
     IEnumerable <IWebPolicy> policies)
     : base(configuration, externalUrl, serverPortNumber, applicationPath, fileSystem, applicationInfo, timeService, viewRenderingEngine, fileMimeTypesMap, webServerController, routes, policies)
 {
 }
Example #5
0
        public HttpModuleWebContext(
            HttpContext context,
            IFileSystem fileSystem,
            ITimeService timeService,
            IWebServerConfiguration configuration,
            IRazorViewRenderingEngine viewRenderingEngine,
            IFileMimeTypesMap fileMimeTypesMap)
        {
            Contract.Requires(context != null);

            this.context             = context;
            this.FileSystem          = fileSystem;
            this.TimeService         = timeService;
            this.Configuration       = configuration;
            this.ViewRenderingEngine = viewRenderingEngine;
            this.FileMimeTypesMap    = fileMimeTypesMap;
            requestCookies           = new HttpModuleCookiesCollection(context.Request.Cookies);
            responseCookies          = new HttpModuleCookiesCollection(context.Response.Cookies);
        }