コード例 #1
0
        protected virtual async Task <IISDeploymentResult> DeployAsync(IISDeploymentParameters parameters)
        {
            if (!parameters.EnvironmentVariables.ContainsKey(DebugEnvironmentVariable))
            {
                parameters.EnvironmentVariables[DebugEnvironmentVariable] = "4";
            }

            if (parameters.ServerType == ServerType.IISExpress)
            {
                parameters.ServerConfigTemplateContent = parameters.ServerConfigTemplateContent ?? File.ReadAllText("IISExpress.config");
            }


            _deployer = IISApplicationDeployerFactory.Create(parameters, LoggerFactory);

            return((IISDeploymentResult)await _deployer.DeployAsync());
        }
コード例 #2
0
        protected virtual async Task <IISDeploymentResult> DeployAsync(DeploymentParameters parameters)
        {
            if (!parameters.EnvironmentVariables.ContainsKey(DebugEnvironmentVariable))
            {
                parameters.EnvironmentVariables[DebugEnvironmentVariable] = "4";
            }

            // Currently hosting throws if the Servertype = IIS.
            if (parameters.ServerType == ServerType.IIS)
            {
                _deployer = new IISDeployer(parameters, LoggerFactory);
            }
            else
            {
                _deployer = ApplicationDeployerFactory.Create(parameters, LoggerFactory);
            }

            var result = await _deployer.DeployAsync();

            return(new IISDeploymentResult(result, Logger));
        }
コード例 #3
0
 public void StopServer()
 {
     _deployer?.Dispose();
     _deployer = null;
 }
コード例 #4
0
 protected virtual async Task <IISDeploymentResult> DeployAsync(IISDeploymentParameters parameters)
 {
     _deployer = CreateDeployer(parameters);
     return((IISDeploymentResult)await _deployer.DeployAsync());
 }