/// <summary> /// 获取应用程序名称 /// </summary> /// <param name="applicationName"></param> /// <returns></returns> public string GetVersionByApplicationName(string applicationName) { if (AppList == null || !AppList.Any()) { var appXMLPath = appInfoXMLPath + applicationName + ".txt"; if (File.Exists(appXMLPath)) { var getTxtString = File.ReadAllText(appXMLPath, Encoding.Default); var appEntity = FileProcessingHelper.GetTFromXML <ApplicationEntity>(getTxtString); if (appEntity != null) { AppList = new List <ApplicationEntity>(); AppList.Add(appEntity); return(appEntity.AppVersion); } } return(string.Empty); } if (AppList.Exists(o => o.AppName == applicationName) && !string.IsNullOrEmpty(AppList.FirstOrDefault(o => o.AppName == applicationName).AppVersion)) { return(AppList.FirstOrDefault(o => o.AppName == applicationName).AppVersion); } return(string.Empty); }