示例#1
0
        private List <LocalTempList> gatherPackageManifests()
        {
            var provider = StorageProviderFactory.GetSourceRepositoryProvider();
            var rootDir  = provider.GetRootDirectory();

            //var rootDir = new System.IO.DirectoryInfo(_foreignPackageStore);
            if (!rootDir.Exists)
            {
                throw new Exception(string.Format("The foreign source with path {0} can not be accessed or found", _foreignPackageStore));
            }

            var tempLocalList = findManifest(rootDir);

            return(tempLocalList);
        }
示例#2
0
        public void GetApplication(List <Package> packages)
        {
            var sourceProvider      = StorageProviderFactory.GetSourceRepositoryProvider();
            var destinationProvider = StorageProviderFactory.GetDestinationeRepositoryProvider();

            foreach (var package in packages)
            {
                var path = package.ForeignPath.Replace(_manifestFileName, "");
                Console.WriteLine("Getting application {0} from path: {1}", package.ApplicationName, path);

                var sourceAppDir = sourceProvider.GetDirectoy(path);
                var destRootDir  = destinationProvider.GetRootDirectory();
                //var destAppDir = destRootDir.CreateSubdirectory(package.ApplicationName +"_"+ package.ApplicationVersion);

                createDirectoriesAndFiles(sourceAppDir, destRootDir, package.ApplicationName + "_" + package.ApplicationVersion);
                Console.WriteLine("Done!");
            }
        }