Beispiel #1
0
 public void LoadContents(HtmlReaderWriter reader)
 {
     Monitor.Enter(SyncRoot);
     try
     {
         if (_fileName == null)
         {
             throw new InvalidOperationException("Page name is not defined");
         }
         Content = reader.GetContent(GetSideNavItems().Count > 0, _fileName);
         if (_childPages != null)
         {
             foreach (HtmlPage page in _childPages.ToArray())
             {
                 page.LoadContents(reader);
             }
         }
     }
     finally { Monitor.Exit(SyncRoot); }
 }
Beispiel #2
0
 public void SaveContents(HtmlReaderWriter writer)
 {
     Monitor.Enter(SyncRoot);
     try { writer.SavePages((new HtmlPage[] { this }).Concat(GetAllChildPages())); }
     finally { Monitor.Exit(SyncRoot); }
 }