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