Aspose.Words.Examples.CSharp.Loading_Saving.Worker.SaveTableOfContents C# (CSharp) Метод

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

Generates a table of contents for the topics and saves to contents.html.
private SaveTableOfContents ( ArrayList topics ) : void
topics System.Collections.ArrayList
Результат void
        private void SaveTableOfContents(ArrayList topics)
        {
            Document tocDoc = new Document(mTocTemplate);

            // We use a custom mail merge even handler defined below.
            tocDoc.MailMerge.FieldMergingCallback = new HandleTocMergeField();
            // We use a custom mail merge data source based on the collection of the topics we created.
            tocDoc.MailMerge.ExecuteWithRegions(new TocMailMergeDataSource(topics));

            tocDoc.Save(Path.Combine(mDstDir, "contents.html"));
        }