From 868a7ce9c8b50bd64c8b5ae33fec77abfd25ef7c Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Thu, 21 Feb 2013 23:23:06 -0500 Subject: isolated clickonce dependancies --- MediaBrowser.Common/Net/HttpServer.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Common/Net/HttpServer.cs') diff --git a/MediaBrowser.Common/Net/HttpServer.cs b/MediaBrowser.Common/Net/HttpServer.cs index 184b82c16..b09c95da0 100644 --- a/MediaBrowser.Common/Net/HttpServer.cs +++ b/MediaBrowser.Common/Net/HttpServer.cs @@ -45,6 +45,12 @@ namespace MediaBrowser.Common.Net /// The kernel. private IKernel Kernel { get; set; } + /// + /// Gets or sets the application host. + /// + /// The application host. + private IApplicationHost ApplicationHost { get; set; } + /// /// This subscribes to HttpListener requests and finds the appropriate BaseHandler to process it /// @@ -67,11 +73,12 @@ namespace MediaBrowser.Common.Net /// /// The URL. /// Name of the product. + /// The application host. /// The kernel. /// The logger. /// The default redirectpath. /// urlPrefix - public HttpServer(string urlPrefix, string serverName, IKernel kernel, ILogger logger, string defaultRedirectpath = null) + public HttpServer(string urlPrefix, string serverName, IApplicationHost applicationHost, IKernel kernel, ILogger logger, string defaultRedirectpath = null) : base() { if (string.IsNullOrEmpty(urlPrefix)) @@ -86,9 +93,14 @@ namespace MediaBrowser.Common.Net { throw new ArgumentNullException("logger"); } + if (applicationHost == null) + { + throw new ArgumentNullException("applicationHost"); + } DefaultRedirectPath = defaultRedirectpath; _logger = logger; + ApplicationHost = applicationHost; EndpointHostConfig.Instance.ServiceStackHandlerFactoryPath = null; EndpointHostConfig.Instance.MetadataRedirectPath = "metadata"; @@ -144,6 +156,7 @@ namespace MediaBrowser.Common.Net container.Register(Kernel); container.Register(_logger); + container.Register(ApplicationHost); foreach (var service in Kernel.RestServices) { -- cgit v1.2.3