Пример #1
0
        private List <CompareFileEntity> GetNeedUpdateFileList()
        {
            //获取本地版本与服务器差异
            List <FileEntity> localfelist = new List <FileEntity>();
            DirectoryInfo     dic         = new DirectoryInfo(Application.StartupPath);

            AutoUpdateHelper.GetChildFile(dic, localfelist, "/");

            List <FileEntity> serverfelist = new List <FileEntity>();

            AutoUpdateSvc.FileEntity[] sflist = updatesvc.GetServerFileList();
            foreach (var item in sflist)
            {
                serverfelist.Add(ConvertToFileEntity(item));
            }


            List <FileEntity> ignorefelist = new List <FileEntity>();

            AutoUpdateSvc.FileEntity[] iglist = updatesvc.GetIgnoreFileList();
            foreach (var item in iglist)
            {
                ignorefelist.Add(ConvertToFileEntity(item));
            }

            List <CompareFileEntity> comlist = new List <CompareFileEntity>();

            comlist = AutoUpdateHelper.GetUpdateFileList(serverfelist, localfelist, ignorefelist);


            return(comlist);
        }
Пример #2
0
        public List <FileEntity> GetServerFileList()
        {
            List <FileEntity> felist = new List <FileEntity>();
            DirectoryInfo     dic    = new DirectoryInfo(Server.MapPath("~/") + "ServerFiles/");

            AutoUpdateHelper.GetChildFile(dic, felist, "/");
            return(felist);
        }