private static string Generate(WixComponentGenerator generator, IEnumerable <WixFile> files) { var stringWriter = new StringWriter(); using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings { Indent = true })) { generator.Write(files, xmlWriter); } return(stringWriter.ToString()); }
public string GeneratePackagesComponentFile(string outputDirectory, Dictionary <PackageIdentity, FileInfoBase> files) { var filename = _fileSystem.Path.Combine(outputDirectory, PackagesComponentsFilename); using (var xmlWriter = XmlWriter.Create(filename, new XmlWriterSettings { Indent = true })) { var generator = new WixComponentGenerator("PackageComponents", "MazePackages"); generator.Write(files.Select(x => new WixFile(x.Value.FullName, x.Key.ToString())), xmlWriter); } return(filename); }