Пример #1
0
        private Host GetHost()
        {
            if (_shutdownInProgress)
            {
                return(null);
            }

            Host host = _host;

            if (host == null)
            {
                lock (this)
                {
                    host = _host;
                    if (host == null)
                    {
                        host = CreateWorkerAppDomainWithHost(_virtualPath, _physicalPath);
                        host.Configure(this, _port, _virtualPath, _physicalPath);
                        _host = host;
                    }
                }
            }

            return(host);
        }