internal override void Serialize(XmlSerializer serializer) { bool hasPrimary = HasHeaderFooter(HeaderFooterIndex.Primary); bool hasEvenPage = HasHeaderFooter(HeaderFooterIndex.EvenPage); bool hasFirstPage = HasHeaderFooter(HeaderFooterIndex.FirstPage); bool hasLastPage = HasHeaderFooter(HeaderFooterIndex.LastPage); // \primary... if (hasPrimary) { Primary.Serialize(serializer, "Primary"); } // \even... if (hasEvenPage) { EvenPage.Serialize(serializer, "Evenpage"); } // \firstpage... if (hasFirstPage) { FirstPage.Serialize(serializer, "Firstpage"); } if (hasLastPage) { LastPage.Serialize(serializer, "Lastpage"); } }
/// <summary> /// Converts HeadersFooters into DDL. /// </summary> public override void Serialize(Serializer serializer) { bool hasPrimary = HasHeaderFooter(HeaderFooterIndex.Primary); bool hasEvenPage = HasHeaderFooter(HeaderFooterIndex.EvenPage); bool hasFirstPage = HasHeaderFooter(HeaderFooterIndex.FirstPage); // \primary... if (hasPrimary) { Primary.Serialize(serializer, "primary"); } // \even... if (hasEvenPage) { EvenPage.Serialize(serializer, "evenpage"); } // \firstpage... if (hasFirstPage) { FirstPage.Serialize(serializer, "firstpage"); } }