Ejemplo n.º 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);
     }
 }
Ejemplo n.º 2
0
 private void triggerCrawlerJobViewUpdateEventAddedNewProcessInformation(CrawlerProcessInformation crawlerProcessInformation)
 {
     if (crawlerJobViewUpdateEventAddedNewProcessInformation != null)
     {
         lock (crawlerProcessInformation)
         {
             crawlerJobViewUpdateEventAddedNewProcessInformation(crawlerProcessInformation);
         }
     }
 }
Ejemplo n.º 3
0
 private void crawlerProcessInformation_UpdateEvent(CrawlerProcessInformation crawlerProcessInformation)
 {
     this.determineProcessInformationActiveState(crawlerProcessInformation);
     lock (crawlerProcessInformation)
     {
         if (this.updateProcessInformationEvent != null)
         {
             this.updateProcessInformationEvent(crawlerProcessInformation);
         }
     }
 }
Ejemplo n.º 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);
                    }
                }
            }
        }