/// <summary> /// Gets the list of appfiles from /// </summary> /// <param name="file"></param> /// <returns></returns> public static IEnumerable <AppFile> GetAppFiles(string file) { if (string.IsNullOrEmpty(file)) { throw new NullReferenceException(); } var appfiles = new List <AppFile>(); using (var reader = XmlReader.Create(file)) { while (reader.Read()) { if (reader.IsStartElement()) { if (reader.Name == "File") { var appfile = new AppFile(reader["SysPath"], Convert.ToDouble(reader["VersionID"]), Convert.ToInt32(reader["FileID"])); appfile.Name = reader["Name"]; appfiles.Add(appfile); } } } } return(appfiles); }
/// <summary> /// Gets the list of appfiles from /// </summary> /// <param name="file"></param> /// <returns></returns> public static IEnumerable<AppFile> GetAppFiles(string file) { if (string.IsNullOrEmpty(file)) throw new NullReferenceException(); var appfiles = new List<AppFile>(); using (var reader = XmlReader.Create(file)) { while (reader.Read()) { if (reader.IsStartElement()) if (reader.Name == "File") { var appfile = new AppFile(reader["SysPath"], Convert.ToDouble(reader["VersionID"]), Convert.ToInt32(reader["FileID"])); appfile.Name = reader["Name"]; appfiles.Add(appfile); } } } return appfiles; }