public void load_packages_by_assembly() { var includes = new PackageManifest(); new FileSystem().PersistToFile(includes, theApplicationDirectory, PackageManifest.FILE); var links = new LinkManifest(); links.AddLink("../TestPackage1"); new FileSystem().PersistToFile(links, theApplicationDirectory, LinkManifest.FILE); var assemblyLoader = new AssemblyLoader(new BottlingDiagnostics()); assemblyLoader.AssemblyFileLoader = file => Assembly.Load(Path.GetFileNameWithoutExtension(file)); var package = linkedFolderReader.Load(new PackageLog()).Single(); assemblyLoader.LoadAssembliesFromPackage(package); assemblyLoader .Assemblies .Single() .GetName() .Name .ShouldEqual("TestPackage1"); }
public void load_all_packages_by_reading_the_include_folder() { var includes = new PackageManifest(); includes.AddLink("../TestPackage1"); new FileSystem().PersistToFile(includes, theApplicationDirectory, PackageManifest.FILE); var assemblyLoader = new AssemblyLoader(new PackagingDiagnostics()); assemblyLoader.AssemblyFileLoader = file => Assembly.Load(File.ReadAllBytes(file)); var package = linkedFolderReader.Load(new PackageLog()).Single(); assemblyLoader.LoadAssembliesFromPackage(package); assemblyLoader.Assemblies.Single().GetName().Name.ShouldEqual("TestPackage1"); }
private static string[] determineLinkedFolders() { var loader = new LinkedFolderPackageLoader(FubuMvcPackageFacility.GetApplicationPath(), x => x); var packages = loader.Load(new PackageLog()); var links = new List <string>(); packages.Each(x => x.ForFolder(BottleFiles.WebContentFolder, links.Add)); return(links.ToArray()); }
private static string[] determineLinkedFolders() { var loader = new LinkedFolderPackageLoader(FubuMvcPackageFacility.GetApplicationPath(), x => x); var packages = loader.Load(new PackageLog()); var links = new List<string>(); packages.Each(x => x.ForFolder(BottleFiles.WebContentFolder, links.Add)); return links.ToArray(); }