/// <summary> /// 处理详细更新简要 /// </summary> /// <param name="p_html">HTML文档</param> private BCW.Update.Model.UpdateInfo UpdateHtml(string p_html) { if (string.IsNullOrEmpty(p_html)) { return(null); } BCW.Update.Model.UpdateInfo obj = new BCW.Update.Model.UpdateInfo(); using (XmlReaderExtend reader = new XmlReaderExtend(p_html)) { while (reader.ReadToFollowing("data")) { obj.Version = reader.GetElementValue("Version"); obj.ToPath = reader.GetElementValue("ToPath"); obj.RePath = reader.GetElementValue("RePath"); obj.Paths = reader.GetElementValue("Paths"); obj.Notes = reader.GetElementValue("Notes"); obj.WithTime = reader.GetElementValue("WithTime"); obj.AddTime = reader.GetElementValue("AddTime"); } } return(obj); }
/// <summary> /// 取得FTP /// </summary> public BCW.Update.Model.UpdateInfo GetFtpXML(string GetUrl) { BCW.Update.Model.UpdateInfo obj = null; string url = GetUrl; HttpRequestCache httpRequest = new HttpRequestCache(url); httpRequest.Fc.CacheUsed = this._CacheUsed; httpRequest.Fc.CacheTime = this._CacheTime; httpRequest.Fc.CacheFolder = this._CacheFolder; httpRequest.Fc.CacheFile = "lightcms-ftp"; httpRequest.WebAsync.RevCharset = "utf-8"; if (httpRequest.MethodGetUrl(out this._ResponseValue)) { obj = FtpHtml(this._ResponseValue); } return(obj); }
/// <summary> /// 处理详细版本号 /// </summary> /// <param name="p_html">HTML文档</param> private BCW.Update.Model.UpdateInfo VersionHtml(string p_html) { if (string.IsNullOrEmpty(p_html)) { return(null); } BCW.Update.Model.UpdateInfo obj = new BCW.Update.Model.UpdateInfo(); using (XmlReaderExtend reader = new XmlReaderExtend(p_html)) { while (reader.ReadToFollowing("data")) { obj.Version = reader.GetElementValue("Version"); obj.SpDomain = reader.GetElementValue("SpDomain"); obj.FtpData = reader.GetElementValue("FtpData"); } } return(obj); }
/// <summary> /// 处理详细版本号 /// </summary> /// <param name="p_html">HTML文档</param> private BCW.Update.Model.UpdateInfo FtpHtml(string p_html) { if (string.IsNullOrEmpty(p_html)) { return(null); } BCW.Update.Model.UpdateInfo obj = new BCW.Update.Model.UpdateInfo(); using (XmlReaderExtend reader = new XmlReaderExtend(p_html)) { while (reader.ReadToFollowing("data")) { obj.RemoteHost = reader.GetElementValue("RemoteHost"); obj.RemotePort = Convert.ToInt32(reader.GetElementValue("RemotePort")); obj.RemoteUser = reader.GetElementValue("RemoteUser"); obj.RemotePass = reader.GetElementValue("RemotePass"); obj.RemotePath = reader.GetElementValue("RemotePath"); } } return(obj); }