Bloom.Book.BookStorage.HandleRetiredXMatterPacks C# (CSharp) Method

HandleRetiredXMatterPacks() public method

public HandleRetiredXMatterPacks ( HtmlDom dom, string nameOfXMatterPack ) : string
dom HtmlDom
nameOfXMatterPack string
return string
        public string HandleRetiredXMatterPacks(HtmlDom dom, string nameOfXMatterPack)
        {
            // Bloom 3.7 retired the BigBook xmatter pack.
            // If we ever create another xmatter pack called BigBook (or rename the Factory pack) we'll need to redo this.
            string[] retiredPacks = { "BigBook" };
            const string xmatterSuffix = "-XMatter.css";

            if (retiredPacks.Contains(nameOfXMatterPack))
            {
                EnsureDoesntHaveLinkToStyleSheet(dom, nameOfXMatterPack + xmatterSuffix);
                nameOfXMatterPack = "Factory";
                EnsureHasLinkToStyleSheet(dom, nameOfXMatterPack + xmatterSuffix);
                // Since HtmlDom.GetMetaValue() is always called with the collection's xmatter pack as default,
                // we can just remove this wrong meta element.
                dom.RemoveMetaElement("xmatter");
            }
            return nameOfXMatterPack;
        }