Bloom.Publish.EpubMaker.MakeSpine C# (CSharp) Méthode

MakeSpine() private méthode

private MakeSpine ( System.Xml.Linq.XNamespace opf, System.Xml.Linq.XElement rootElt, string manifestPath ) : void
opf System.Xml.Linq.XNamespace
rootElt System.Xml.Linq.XElement
manifestPath string
Résultat void
        private void MakeSpine(XNamespace opf, XElement rootElt, string manifestPath)
        {
            // Generate the spine, which indicates the top-level readable content in order.
            // These IDs must match the corresponding ones in the manifest, since the spine
            // doesn't indicate where to actually find the content.
            var spineElt = new XElement(opf + "spine");
            rootElt.Add(spineElt);
            foreach (var item in _spineItems)
            {
                var itemElt = new XElement(opf + "itemref",
                    new XAttribute("idref", GetIdOfFile(item)));
                spineElt.Add(itemElt);
            }
            using (var writer = XmlWriter.Create(manifestPath))
                rootElt.WriteTo(writer);
        }