Exemple #1
0
        protected ApplicationDeployer CreateDeployer(IISDeploymentParameters parameters)
        {
            if (parameters.ServerType == ServerType.IISExpress &&
                !parameters.EnvironmentVariables.ContainsKey(DebugEnvironmentVariable))
            {
                parameters.EnvironmentVariables[DebugEnvironmentVariable] = "console";
            }

            return(IISApplicationDeployerFactory.Create(parameters, LoggerFactory));
        }
        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 ApplicationDeployer CreateDeployer(IISDeploymentParameters parameters)
        {
            if (!parameters.EnvironmentVariables.ContainsKey(DebugEnvironmentVariable))
            {
                parameters.EnvironmentVariables[DebugEnvironmentVariable] = "console";
            }

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

            if (parameters.ApplicationPublisher == null)
            {
                throw new InvalidOperationException("All tests should use ApplicationPublisher");
            }

            return(IISApplicationDeployerFactory.Create(parameters, LoggerFactory));
        }