public void Upload(string appName, Version ver, string appBasePath)
        {
            if (string.IsNullOrEmpty(appName))
            {
                throw new ArgumentNullException(nameof(appName));
            }
            if (ver == null)
            {
                throw new ArgumentNullException(nameof(ver));
            }
            if (string.IsNullOrEmpty(appName))
            {
                throw new ArgumentNullException(nameof(appBasePath));
            }
            if (!Directory.Exists(appBasePath))
            {
                throw new DirectoryNotFoundException(appBasePath);
            }

            var indexFile = GenerateIndexFile(appName, ver, appBasePath);

            if (indexFile.GetFileNames().Count == 0)
            {
                return;
            }
            var client = new FileTransferSvc.Ver1.TcpFileTransmitServiceClient();

            foreach (var fileInfo in indexFile.GetFileNames())
            {
                client.Upload(fileInfo, null);
            }
        }
        public IList<AppInfo> GetServerApps()
        {
            var client = new FileTransferSvc.Ver1.TcpFileTransmitServiceClient();

            client.DownLoad("index.xml", null);
            var serializer = new XmlSerializer(typeof(AppInfo), new Type[] { typeof(FileDetail) });
            var indexFileName = Path.Combine(@"R:\DownloadFiles", "index.xml");
            using (var fileReader = File.OpenRead(indexFileName))
            {
                var appInfo = serializer.Deserialize(fileReader);
                return new List<AppInfo>() { appInfo as AppInfo };
            }
        }
        public IList <AppInfo> GetServerApps()
        {
            var client = new FileTransferSvc.Ver1.TcpFileTransmitServiceClient();

            client.DownLoad("index.xml", null);
            var serializer    = new XmlSerializer(typeof(AppInfo), new Type[] { typeof(FileDetail) });
            var indexFileName = Path.Combine(@"R:\DownloadFiles", "index.xml");

            using (var fileReader = File.OpenRead(indexFileName))
            {
                var appInfo = serializer.Deserialize(fileReader);
                return(new List <AppInfo>()
                {
                    appInfo as AppInfo
                });
            }
        }
        public void Upload(string appName, Version ver, string appBasePath)
        {
            if (string.IsNullOrEmpty(appName)) throw new ArgumentNullException(nameof(appName));
            if (ver == null) throw new ArgumentNullException(nameof(ver));
            if (string.IsNullOrEmpty(appName)) throw new ArgumentNullException(nameof(appBasePath));
            if (!Directory.Exists(appBasePath))
            {
                throw new DirectoryNotFoundException(appBasePath);
            }

            var indexFile = GenerateIndexFile(appName, ver, appBasePath);
            if (indexFile.GetFileNames().Count == 0) return;
            var client = new FileTransferSvc.Ver1.TcpFileTransmitServiceClient();
            foreach (var fileInfo in indexFile.GetFileNames())
            {
                client.Upload(fileInfo, null);
            }
        }