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()); }
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)); }
public void StopServer() { _deployer?.Dispose(); _deployer = null; }
protected virtual async Task <IISDeploymentResult> DeployAsync(IISDeploymentParameters parameters) { _deployer = CreateDeployer(parameters); return((IISDeploymentResult)await _deployer.DeployAsync()); }