public List<DeploymentInfo> Get(QueryDeployments request) { string path; if (!string.IsNullOrEmpty(request.AppName) && !string.IsNullOrEmpty(request.AppRoot)) { path = Path.Combine(IISManager.GetApplicationPath(request.WebsiteName, request.AppRoot, request.AppName), ".."); } else { path = Path.Combine(IISManager.GetWebsitePath(request.WebsiteName), ".."); } var list = new List<DeploymentInfo>(); new DirectoryInfo(path).GetDirectories().ForEach(d => list.Add(new DeploymentInfo { Name = d.Name })); return list; }
public List <DeploymentInfo> Get(QueryDeployments request) { string path; if (!string.IsNullOrEmpty(request.AppName) && !string.IsNullOrEmpty(request.AppRoot)) { path = Path.Combine(IISManager.GetApplicationPath(request.WebsiteName, request.AppRoot, request.AppName), ".."); } else { path = Path.Combine(IISManager.GetWebsitePath(request.WebsiteName), ".."); } var list = new List <DeploymentInfo>(); new DirectoryInfo(path).GetDirectories().ForEach(d => list.Add(new DeploymentInfo { Name = d.Name })); return(list); }