ApiExamples.ExDocumentBuilder.AddFootnoteWithCustomMarks C# (CSharp) Метод

AddFootnoteWithCustomMarks() приватный Метод

private AddFootnoteWithCustomMarks ( ) : void
Результат void
        public void AddFootnoteWithCustomMarks()
        {
            Document doc = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);

            builder.Write("Some text");

            Footnote foot = new Footnote(doc, FootnoteType.Footnote);
            foot.ReferenceMark = "242";

            builder.InsertFootnote(FootnoteType.Footnote, "Footnote text.", foot.ReferenceMark);

            MemoryStream dstStream = new MemoryStream();
            doc.Save(dstStream, SaveFormat.Docx);

            doc = new Document(dstStream);
            foot = (Footnote)doc.GetChildNodes(NodeType.Footnote, true)[0];
            
            Assert.IsFalse(foot.IsAuto);
            Assert.AreEqual("242", foot.ReferenceMark);
            Assert.AreEqual("242 Footnote text.\r", foot.GetText());
        }
ExDocumentBuilder