Example #1
0
        private void DeleteEntryCommon(WikiEntry entry)
        {
            // delete all of our children
            entry.Accept(deleteVisitor);

            // remove from our parent
            if (entry.Parent != null)
            {
                entry.Parent.Children.Remove(entry);

                // now make sure that any empty directories are tidied up
                DeleteParentIfEmpty(entry.Parent);
            }
        }
Example #2
0
        private void FireEvent(Action <object, WikiModelEventArgs> eventToFire, WikiEntry entry, string oldSourcePath = "", string oldWikiPath = "", string oldWikiUrl = "")
        {
            if (eventToFire != null)
            {
                WikiModelEventArgs args = new WikiModelEventArgs(
                    sourcePath: entry.SourcePath,
                    wikiPath: entry.WikiPath,
                    wikiUrl: entry.WikiUrl,
                    oldSourcePath: oldSourcePath,
                    oldWikiPath: oldWikiPath,
                    oldWikiUrl: oldWikiUrl);

                System.Console.WriteLine("{0} Firing event #{1} on thread: {2}", DateTime.Now.Ticks, args.Id, Thread.CurrentThread.Name);

                eventToFire(this, args);
            }
        }
Example #3
0
 private void CommonVisit(WikiEntry entry)
 {
     entry.SourcePath.Replace(oldPath, renamedPath);
     entry.WikiPath.Replace(oldPath, renamedPath);
     entry.WikiUrl.Replace(oldPath, renamedPath);
 }
Example #4
0
 public bool UnsafeTryGetAssetBySourcePath(string fullPath, out WikiEntry entry)
 {
     return wikiEntryMap.TryGetValue(fullPath, out entry);
 }
Example #5
0
 public void AddAsset(string fullPath, WikiEntry entry)
 {
     // add mutable asset
     wikiEntryMap[fullPath] = entry;
     DestroyImmutableMaps();
 }
Example #6
0
 public void AddAsset(string fullPath, WikiEntry entry)
 {
     // add mutable asset
     wikiEntryMap[fullPath] = entry;
     DestroyImmutableMaps();
 }
Example #7
0
 public bool UnsafeTryGetAssetBySourcePath(string fullPath, out WikiEntry entry)
 {
     return(wikiEntryMap.TryGetValue(fullPath, out entry));
 }
Example #8
0
 private void CommonVisit(WikiEntry entry)
 {
     entry.SourcePath.Replace(oldPath, renamedPath);
     entry.WikiPath.Replace(oldPath, renamedPath);
     entry.WikiUrl.Replace(oldPath, renamedPath);
 }