Use custom objects in the dynamic crawl bag
masterAbot allows you to pass custom objects through the crawl process using dynamic 'bags'. You can attach objects to the CrawlBag (available via CrawlContext.CrawlBag), the PageToCrawl.PageBag, or the CrawledPage.PageBag. This is useful for sharing state or metadata between different stages of the crawl.
crawler.CrawlBag.MyFoo1 = new Foo();
crawler.CrawlBag.MyFoo2 = new Foo();
crawler.PageCrawlStarting += crawler_ProcessPageCrawlStarting;
...
void crawler_ProcessPageCrawlStarting(object sender, PageCrawlStartingArgs e)
{
//Get your Foo instances from the CrawlContext object
var foo1 = e.CrawlConext.CrawlBag.MyFoo1;
var foo2 = e.CrawlConext.CrawlBag.MyFoo2;
//Also add a dynamic value to the PageToCrawl or CrawledPage
e.PageToCrawl.PageBag.Bar = new Bar();
}