public override bool Verify() { TaskLogger.LogEnter(); bool flag = false; if (this.webSitePath != null) { flag = IisUtility.Exists(this.WebSitePath, "IIsWebServer"); } else { try { IisUtility.FindWebSiteRoot(this.WebSiteName, this.ServerName); flag = true; } catch (WebObjectNotFoundException) { flag = false; } } TaskLogger.Trace("WebSiteExistsCondition is returning '{0}'", new object[] { flag }); TaskLogger.LogExit(); return(flag); }
public override bool Verify() { TaskLogger.LogEnter(); bool result = false; if (this.virtualDirectoryPath != null) { result = IisUtility.Exists(this.VirtualDirectoryPath, "IIsWebVirtualDir"); } else { try { string str = IisUtility.FindWebSiteRoot(this.WebSiteName, this.ServerName); result = IisUtility.Exists(str + "/" + this.VirtualDirectoryName, "IIsWebVirtualDir"); } catch (WebObjectNotFoundException) { result = false; } } TaskLogger.LogExit(); return(result); }