public GetWebsitePath ( string sitename ) : string | ||
sitename | string | |
return | string |
public void Post(RollbackDeployment request) { if (string.IsNullOrEmpty(request.AppName) && string.IsNullOrEmpty(request.AppRoot)) { var websitePath = IISManager.GetWebsitePath(request.WebsiteName); IISManager.MapWebsitePhysicalPath(request.WebsiteName, Path.Combine(Directory.GetParent(websitePath).FullName, request.RollbackTarget)); } else { IISManager.RollbackApplication(request.WebsiteName, request.AppRoot, request.AppName, request.RollbackTarget); } }
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); }