コード例 #1
0
        public void GenerateSectionMD(string sectionId, string sectionName, IWriter writer)
        {
            if (!String.IsNullOrEmpty(sectionId))
            {
                var pageIds = parser.GetChildObjectIds(
                    sectionId, Microsoft.Office.Interop.OneNote.HierarchyScope.hsChildren,
                    ObjectType.Page);

                try
                {
                    writer.PushDirectory(sectionName);

                    foreach (var pageId in pageIds)
                    {
                        GeneratePageMD(pageId, writer);
                    }
                }
                finally
                {
                    writer.PopDirectory();
                }
            }
        }