PackageBuilder GetPackageBuilder() { // fill ProductId if empty if (this.document.package.ProductId == 0) { this.document.package.ProductId = productIdProvider.GetNextAvailableProductId(); UpdateView(); } var s = new PackageDirectoryStructure(Path.Combine(About.DocumentsDirectory, "output"), this.document.package); return(new PackageBuilder(s, Context.GetDefaultMediaFileConverter(), Settings.Read().CreateOidSvgWriter())); }
public void PackageBuilderTest() { var penDirectory = TestFile("penDirectory"); PathUtil.EnsureNotExists(penDirectory); PathUtil.EnsureDirectoryExists(penDirectory); var converter = new MediaFileConverter(TestFile("media-cache")); var albumReader = new AlbumReader(); var package = Package.CreateFromInputPaths(new[] { TestFile("audio") }); package.Albums.First().Tracks = Enumerable.Range(0, 20).Select(_ => package.Albums.First().Tracks.First()).ToArray(); package.ProductId = 800; var structure = new PackageDirectoryStructure(penDirectory, package); var pb = new PackageBuilder(structure, converter, new OidSvgWriter(new TiptoiOidCode())); pb.Build(CancellationToken.None).Wait(); Console.WriteLine(structure.GmeFile); }
PackageBuilder GetPackageBuilder() { var s = new PackageDirectoryStructure(GetRootDirectory(), this.document.package); return(new PackageBuilder(s, Context.GetDefaultMediaFileConverter(), Settings.Read().CreateOidSvgWriter())); }