public Configure ( |
||
server | ||
port | int | |
virtualPath | string | |
physicalPath | string | |
return | void |
Host GetHost() { if (_shutdownInProgress) { return(null); } Host host = _host; if (host == null) { lock (this) { host = _host; if (host == null) { host = (Host)CreateWorkerAppDomainWithHost(_virtualPath, _physicalPath, typeof(Host)); host.Configure(this, _port, _virtualPath, _physicalPath); _host = host; } } } return(host); }
private Host GetHost() { if (_shutdownInProgress) { return(null); } Host host = _host; if (host == null) { lock (this) { host = _host; if (host == null) { // Put together some unique app id based on the virtual and physical paths string uniqueAppString = String.Concat(_virtualPath, _physicalPath).ToLowerInvariant(); string appId = (uniqueAppString.GetHashCode()).ToString("x", CultureInfo.InvariantCulture); _host = (Host)_appManager.CreateObject(appId, typeof(Host), _virtualPath, _physicalPath, false /*failIfExists*/); _host.Configure(this, _port, _virtualPath, _physicalPath); host = _host; } } } return(host); }
private Host GetHost() { if (_shutdownInProgress) { return(null); } Host host = _host; if (host == null) { lock (this) { host = _host; if (host == null) { // Put together some unique app id based on the virtual and physical paths string uniqueAppString = String.Concat(_virtualPath, _physicalPath).ToLowerInvariant(); string appId = (uniqueAppString.GetHashCode()).ToString("x", CultureInfo.InvariantCulture); Type buildManagerHostType = typeof(HttpRuntime).Assembly.GetType("System.Web.Compilation.BuildManagerHost"); Type hostType = typeof(Host); IRegisteredObject buildManagerHost = _appManager.CreateObject(appId, buildManagerHostType, _virtualPath, _physicalPath, false); buildManagerHostType.InvokeMember( "RegisterAssembly", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.InvokeMethod | System.Reflection.BindingFlags.NonPublic, null, buildManagerHost, new object[2] { hostType.Assembly.FullName, hostType.Assembly.Location }); _host = (Host)_appManager.CreateObject(appId, hostType, _virtualPath, _physicalPath, false /*failIfExists*/); _host.Configure(this, _port, _virtualPath, _physicalPath); host = _host; } } } return(host); }
private void CreateHost() { _host = (Host)ApplicationHost.CreateApplicationHost(typeof(Host), _virtualPath, _physicalPath); _host.Configure(this, _port, _virtualPath, _physicalPath, _installPath); }
private Host GetHost() { if (_shutdownInProgress) return null; Host host = _host; if (host == null) { lock (this) { host = _host; if (host == null) { // Put together some unique app id based on the virtual and physical paths string uniqueAppString = String.Concat(_virtualPath, _physicalPath).ToLowerInvariant(); string appId = (uniqueAppString.GetHashCode()).ToString("x", CultureInfo.InvariantCulture); _host = (Host)_appManager.CreateObject(appId, typeof(Host), _virtualPath, _physicalPath, false /*failIfExists*/); _host.Configure(this, _port, _virtualPath, _physicalPath); host = _host; } } } return host; }
private void CreateHost() { _host = (Host)ApplicationHost.CreateApplicationHost(typeof(Host), _virtualPath, _physicalPath); _host.Configure(this, _port, _virtualPath, _physicalPath, _installPath); }