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 IEnumerable<IPackageInfo> Load(IPackageLog log) { var manifestReader = new BottleManifestReader(new FileSystem(), folder => folder); var pis = PackageManifest.FindManifestFilesInDirectory(_searchPoint) .Select(Path.GetDirectoryName) .Select(manifestReader.LoadFromFolder); var filtered = pis.Where(pi=>BottleRoles.Module.Equals(pi.Role)); LogWriter.Current.PrintHorizontalLine(); LogWriter.Current.Trace("Solution Package Loader found:"); LogWriter.Current.Indent(() => { filtered.Each(p => LogWriter.Current.Trace(p.Name)); }); LogWriter.Current.PrintHorizontalLine(); return filtered; }
public void SetUp() { packageFolder = FileSystem.Combine("../../../TestPackage1").ToFullPath(); var fileSystem = new FileSystem(); var manifest = new PackageManifest{ Name = "pak1" }; manifest.AddAssembly("TestPackage1"); fileSystem.PersistToFile(manifest, packageFolder, PackageManifest.FILE); linkedFolderReader = new LinkedFolderPackageLoader(theApplicationDirectory, f => f); reader = new BottleManifestReader(fileSystem, folder => folder); }
public TopshelfBottleLoader(IBottleExploder exploder) { _exploder = exploder; _reader = new BottleManifestReader(new FileSystem(), getContentFolderForPackage); }
public LinkedFolderPackageLoader(string applicationDirectory, Func<string, string> getContentFolderFromPackageFolder) { _applicationDirectory = applicationDirectory; _reader = new BottleManifestReader(_fileSystem, getContentFolderFromPackageFolder); }