示例#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);
            }
        }
示例#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);
            }
        }
示例#3
0
 private void CommonVisit(WikiEntry entry)
 {
     entry.SourcePath.Replace(oldPath, renamedPath);
     entry.WikiPath.Replace(oldPath, renamedPath);
     entry.WikiUrl.Replace(oldPath, renamedPath);
 }
示例#4
0
 public bool UnsafeTryGetAssetBySourcePath(string fullPath, out WikiEntry entry)
 {
     return wikiEntryMap.TryGetValue(fullPath, out entry);
 }
示例#5
0
 public void AddAsset(string fullPath, WikiEntry entry)
 {
     // add mutable asset
     wikiEntryMap[fullPath] = entry;
     DestroyImmutableMaps();
 }
示例#6
0
 public void AddAsset(string fullPath, WikiEntry entry)
 {
     // add mutable asset
     wikiEntryMap[fullPath] = entry;
     DestroyImmutableMaps();
 }
示例#7
0
 public bool UnsafeTryGetAssetBySourcePath(string fullPath, out WikiEntry entry)
 {
     return(wikiEntryMap.TryGetValue(fullPath, out entry));
 }
示例#8
0
 private void CommonVisit(WikiEntry entry)
 {
     entry.SourcePath.Replace(oldPath, renamedPath);
     entry.WikiPath.Replace(oldPath, renamedPath);
     entry.WikiUrl.Replace(oldPath, renamedPath);
 }