예제 #1
0
 /// <summary>
 /// Removes all protected pages from the Word wiki structure.
 /// </summary>
 /// <param name="wiki">The wiki instance.</param>
 /// <param name="wildcards">The list of protected pages wildcards.</param>
 public void HideProtectedPages(Wiki wiki, List <String> wildcards)
 {
     foreach (XWikiDocument doc in wiki.GetAllDocuments())
     {
         foreach (String wildcard in wildcards)
         {
             String docFullName = doc.space + "." + doc.name;
             if (UtilityClass.IsWildcardMatch(wildcard, docFullName, true))
             {
                 wiki.RemoveXWikiDocument(doc);
                 break;
             }
         }
     }
 }