Exemple #1
0
        public static ZipFilePackageLoader BuildZipFilePackageLoader(string applicationPath, FileSystem fileSystem)
        {
            var             zipFileManifestReader = new PackageManifestReader(applicationPath, fileSystem, ZipFilePackageLoader.GetContentFolderForPackage);
            PackageExploder packageExploder       = PackageExploder.GetPackageExploder(fileSystem);

            return(new ZipFilePackageLoader(zipFileManifestReader, packageExploder));
        }
        public void SetUp()
        {
            packageFolder = FileSystem.Combine("../../../TestPackage1").ToFullPath();

            var fileSystem = new FileSystem();
            var manifest = new PackageManifest(){
                Assemblies = "TestPackage1",
                Name = "pak1"
            };

            fileSystem.PersistToFile(manifest, packageFolder, PackageManifest.FILE);

            reader = new PackageManifestReader("../../".ToFullPath(), fileSystem);
        }
        public IEnumerable <IPackageInfo> Load(IPackageLog log)
        {
            var exploder = PackageExploder.GetPackageExploder(log);
            var reader   = new PackageManifestReader(new FileSystem(), GetContentFolderForPackage);

            return(FubuMvcPackageFacility.GetPackageDirectories().SelectMany(dir =>
            {
                return exploder.ExplodeDirectory(new ExplodeDirectory()
                {
                    DestinationDirectory = FubuMvcPackageFacility.GetExplodedPackagesDirectory(),
                    PackageDirectory = dir,
                    Log = log
                });
            }).Select(dir => reader.LoadFromFolder(dir)));
        }
 public static ZipFilePackageReader BuildZipFilePackageReader(string applicationPath, FileSystem fileSystem)
 {
     var zipFileManifestReader = new PackageManifestReader(applicationPath, fileSystem, ZipFilePackageReader.GetContentFolderForPackage);
     PackageExploder packageExploder = GetPackageExploder(fileSystem);
     return new ZipFilePackageReader(zipFileManifestReader, packageExploder);
 }
 public static ZipFilePackageReader BuildZipFilePackageReader(string applicationPath, FileSystem fileSystem)
 {
     var zipFileManifestReader = new PackageManifestReader(applicationPath, fileSystem, dir => FileSystem.Combine(applicationPath, FubuMvcPackages.WebContentFolder));
     var packageExploder = new PackageExploder(new ZipFileService(), new PackageExploderLogger(x => Console.WriteLine(x)), fileSystem);
     return new ZipFilePackageReader(zipFileManifestReader, packageExploder);
 }
 public static ZipFilePackageReader BuildZipFilePackageReader(string applicationPath, FileSystem fileSystem)
 {
     var zipFileManifestReader = new PackageManifestReader(applicationPath, fileSystem, ZipFilePackageReader.GetContentFolderForPackage);
     var packageExploder = new PackageExploder(new ZipFileService(), new PackageExploderLogger(x => Console.WriteLine(x)), fileSystem);
     return new ZipFilePackageReader(zipFileManifestReader, packageExploder);
 }