public override IEnumerable <string> GetTargetFolders(IObjectFactory objectFactory, EnvironmentInfo environmentInfo)
        {
            Guard.NotNull(objectFactory, "objectFactory");
            Guard.NotNull(environmentInfo, "environmentInfo");

            WebAppProjectConfiguration configuration =
                environmentInfo.GetWebAppProjectConfiguration(this);

            return
                (environmentInfo
                 .WebServerMachineNames
                 .Select(
                     wsmn =>
                     environmentInfo.GetWebServerNetworkPath(
                         wsmn,
                         Path.Combine(environmentInfo.WebAppsBaseDirPath, configuration.WebAppDirName)))
                 .ToList());
        }
        public IEnumerable <string> GetTargetUrls(EnvironmentInfo environmentInfo)
        {
            if (environmentInfo == null)
            {
                throw new ArgumentNullException("environmentInfo");
            }

            WebAppProjectConfiguration webAppProjectConfiguration =
                environmentInfo.GetWebAppProjectConfiguration(this);

            // TODO IMM HI: what about https vs http?
            return
                (environmentInfo.WebServerMachineNames
                 .Select(
                     wsmn =>
                     string.Format(
                         "http://{0}/{1}",
                         wsmn,
                         webAppProjectConfiguration.WebAppName))
                 .ToList());
        }
        private void CheckConfiguration(WebAppProjectConfiguration configuration)
        {
            if (string.IsNullOrEmpty(configuration.WebAppName))
              {
            List<WebAppProjectInfo> webAppProjects = GetProjects<WebAppProjectInfo>();

            if (webAppProjects.Count(x => x.WebSiteName == configuration.WebSiteName) > 1)
            {
              throw new DeploymentTaskException(string.Format("Configuration error, WebAppName is empty and there is more than one application on specified WebSiteName: '{0}'.", configuration.WebSiteName));
            }
              }
        }