public void SetUp() { fileSystem = new FileSystem(); fileSystem.DeleteDirectory("app1"); var exploder = new BottleExploder(new ZipFileService(fileSystem), new BottleExploderLogger(s => ConsoleWriter.Write(s)), fileSystem); var thePackage = new PackageInfo(new PackageManifest()); exploder.ExplodeAssembly("app1", typeof(EmptyPackageMarker).Assembly, thePackage); }
public IEnumerable <IPackageInfo> Load(IPackageLog log) { var exploder = BottleExploder.GetPackageExploder(log); var reader = new BottleManifestReader(new FileSystem(), GetContentFolderForPackage); return(FubuMvcPackageFacility.GetPackageDirectories().SelectMany(dir => { return exploder.ExplodeDirectory(new ExplodeDirectory() { DestinationDirectory = FubuMvcPackageFacility.GetExplodedPackagesDirectory(), BottleDirectory = dir, Log = log }); }).Select(dir => reader.LoadFromFolder(dir))); }
public AssemblyPackageInfo(Assembly assembly) { _manifest = DetermineManifest(assembly); _inner = new Lazy <PackageInfo>(() => { var inner = new PackageInfo(_manifest); var exploder = BottleExploder.GetPackageExploder(new FileSystem()); exploder.ExplodeAssembly(PackageRegistry.GetApplicationDirectory(), assembly, inner); return(inner); }); _assembly = assembly; }
public IEnumerable <IPackageInfo> Load(IPackageLog log) { BottleExploder exploder = BottleExploder.GetPackageExploder(log); var reader = new PackageManifestReader(new FileSystem(), GetContentFolderForPackage); return(_folders.SelectMany(dir => { var explodeDirectory = new ExplodeDirectory { DestinationDirectory = _explosionDirectory, BottleDirectory = dir, Log = log }; return exploder.ExplodeDirectory(explodeDirectory); }).Select(reader.LoadFromFolder)); }
public static IEnumerable <ContentOnlyPackageInfo> FromAssemblies(string applicationDirectory) { var exploder = BottleExploder.GetPackageExploder(new FileSystem()); var assemblies = FubuModuleAttributePackageLoader.FindAssemblies(new string[] { applicationDirectory.AppendPath("bin") }); var list = new List <ContentOnlyPackageInfo>(); foreach (var assembly in assemblies) { var package = new PackageInfo(new PackageManifest()); exploder.ExplodeAssembly(applicationDirectory, assembly, package); package.ForFolder(BottleFiles.WebContentFolder, dir => { list.Add(new ContentOnlyPackageInfo(dir, assembly.GetName().Name)); }); } return(list); }
//REVIEW: should this be here? public virtual IBottleExploder BuildExploder() { return(BottleExploder.GetPackageExploder(new FileSystem())); }