Exemple #1
0
        public StorageCache(ISpider spider)
        {
            _pipeline = BaseEntityDbPipeline.GetPipelineFromAppConfig() as BaseEntityDbPipeline;

            if (_pipeline == null)
            {
                throw new SpiderException("Can not get StorageCache's pipeline.");
            }
            _pipeline.AddEntity(EntityDefine.Parse <CrawlCache>());
            _pipeline.InitPipeline(spider);

            _spider = spider;
        }
Exemple #2
0
 public void CreateTable(BaseEntityDbPipeline pipeline)
 {
     pipeline.InitDatabaseAndTable();
 }
Exemple #3
0
 protected override IPipeline GetDefaultPipeline()
 {
     return(BaseEntityDbPipeline.GetPipelineFromAppConfig());
 }