예제 #1
0
        private void FireEvent(Action <object, WikiSiteEventArgs> eventToFire, string wikiPath, string oldWikiPath = "")
        {
            if (eventToFire != null && wikiPath.StartsWith(rootWikiPath))
            {
                // calculate the urls
                string wikiUrl    = PathHelper.GetWikiUrl(rootWikiPath, wikiPath);
                string oldWikiUrl = "";

                if (!string.IsNullOrWhiteSpace(oldWikiPath) && oldWikiPath.StartsWith(rootWikiPath))
                {
                    oldWikiUrl = PathHelper.GetWikiUrl(rootWikiPath, oldWikiPath);
                }

                WikiSiteEventArgs args = new WikiSiteEventArgs(
                    wikiUrl: wikiUrl,
                    oldWikiUrl: oldWikiUrl);

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

                eventToFire(this, args);
            }
        }
예제 #2
0
파일: WikiSite.cs 프로젝트: sbyse/icklewik
 private void HandleSiteUpdate(Action <object, WikiSiteEventArgs> eventToFire, WikiSiteEventArgs args)
 {
     if (eventToFire != null)
     {
         eventToFire(this, args);
     }
 }
예제 #3
0
        private void FireEvent(Action<object, WikiSiteEventArgs> eventToFire, string wikiPath, string oldWikiPath = "")
        {
            if (eventToFire != null && wikiPath.StartsWith(rootWikiPath))
            {
                // calculate the urls
                string wikiUrl = PathHelper.GetWikiUrl(rootWikiPath, wikiPath);
                string oldWikiUrl = "";

                if (!string.IsNullOrWhiteSpace(oldWikiPath) && oldWikiPath.StartsWith(rootWikiPath))
                {
                    oldWikiUrl = PathHelper.GetWikiUrl(rootWikiPath, oldWikiPath);
                }

                WikiSiteEventArgs args = new WikiSiteEventArgs(
                    wikiUrl: wikiUrl,
                    oldWikiUrl: oldWikiUrl);

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

                eventToFire(this, args);
            }
        }
예제 #4
0
파일: WikiSite.cs 프로젝트: sbyse/icklewik
 private void HandleSiteUpdate(Action<object, WikiSiteEventArgs> eventToFire, WikiSiteEventArgs args)
 {
     if (eventToFire != null)
     {
         eventToFire(this, args);
     }
 }