Example #1
0
 public void registerCrawlerProcessInformation(CrawlerProcessInformation crawlerProcessInformation)
 {
     if (crawlerProcessInformation != null)
     {
         crawlerProcessInformation.crawlerProcessInformationUpdateEvent   += new CrawlerProcessInformationUpdateEvent(this.crawlerProcessInformation_UpdateEvent);
         crawlerProcessInformation.crawlerProcessInformationNewImageEvent += new CrawlerProcessInformationNewImageEvent(this.crawlerProcessInformation_crawlerProcessInformationNewImageEvent);
         this.determineProcessInformationActiveState(crawlerProcessInformation);
     }
 }
Example #2
0
 private void triggerCrawlerJobViewUpdateEventAddedNewProcessInformation(CrawlerProcessInformation crawlerProcessInformation)
 {
     if (crawlerJobViewUpdateEventAddedNewProcessInformation != null)
     {
         lock (crawlerProcessInformation)
         {
             crawlerJobViewUpdateEventAddedNewProcessInformation(crawlerProcessInformation);
         }
     }
 }
Example #3
0
 private void crawlerProcessInformation_UpdateEvent(CrawlerProcessInformation crawlerProcessInformation)
 {
     this.determineProcessInformationActiveState(crawlerProcessInformation);
     lock (crawlerProcessInformation)
     {
         if (this.updateProcessInformationEvent != null)
         {
             this.updateProcessInformationEvent(crawlerProcessInformation);
         }
     }
 }
Example #4
0
        private void determineProcessInformationActiveState(CrawlerProcessInformation crawlerProcessInformation)
        {
            if (crawlerProcessInformation != null)
            {
                lock (this.activeCrawlerProcessInformationList)
                {
                    if (crawlerProcessInformation.isActiveProcess())
                    {
                        if (!this.activeCrawlerProcessInformationList.Contains(crawlerProcessInformation))
                        {
                            //
                            this.activeCrawlerProcessInformationList.Add(crawlerProcessInformation);
                            this.triggerCrawlerJobViewUpdateEventAddedNewProcessInformation(crawlerProcessInformation);
                            this.triggerCrawlerJobViewUpdateEventProcessInformationList();
                        }
                    }
                    else
                    {
                        if (this.activeCrawlerProcessInformationList.Contains(crawlerProcessInformation))
                        {
                            //
                            this.activeCrawlerProcessInformationList.Remove(crawlerProcessInformation);
                            this.triggerCrawlerJobViewUpdateEventProcessInformationList();
                        }
                    }
                }

                lock (this.allOccurredCrawlerProcessInformationList)
                {
                    if (!this.allOccurredCrawlerProcessInformationList.Contains(crawlerProcessInformation))
                    {
                        this.allOccurredCrawlerProcessInformationList.Add(crawlerProcessInformation);
                    }
                }
            }
        }