예제 #1
0
 public GenericDatumProvider(IDocumentBrowser webScrapSC, DatumLocator locator, IFetchPolicy fetchPolicy, IResultPolicy resultPolicy)
 {
     myWebScrapSC = webScrapSC;
     Locator      = locator;
     FetchPolicy  = fetchPolicy;
     ResultPolicy = resultPolicy;
 }
예제 #2
0
        public DatumProviderFactory(IDocumentBrowser webScrapSC, IFetchPolicy fetchPolicy, IResultPolicy resultPolicy)
        {
            myWebScrapSC = webScrapSC;
            FetchPolicy  = fetchPolicy;
            ResultPolicy = resultPolicy;

            LocatorRepository = new DatumLocatorRepository();
        }
예제 #3
0
        public DatumProviderFactory( IDocumentBrowser webScrapSC, IFetchPolicy fetchPolicy, IResultPolicy resultPolicy )
        {
            myWebScrapSC = webScrapSC;
            FetchPolicy = fetchPolicy;
            ResultPolicy = resultPolicy;

            LocatorRepository = new DatumLocatorRepository();
        }
예제 #4
0
 public Pipeline(string name, IElementProcessor elementProcessor, IBrowsableElementStore elementStore, IFetchPolicy fetchPolicy)
 {
     _name = name;
     _elementStore = elementStore;
     _demultiplexer = new Demultiplexer();
     _demultiplexer.EventDemultiplexed += OnDemultiplexed;
     _processor = new PipelineProcessor(elementProcessor);
     _processor.EventProcessed += OnEventProcessed;
     _fetcher = new ElementFetcher(fetchPolicy, _elementStore, name);
     _fetcher.ElementFetched += OnElementFetched;
     _fetchTimer = new Timer(x => EvaluateFetchPolicy(), null, TimeSpan.Zero, TimeSpan.FromSeconds(1));
 }
예제 #5
0
 public ElementFetcher(IFetchPolicy fetchPolicy, IBrowsableElementStore elementStore, string pipelineName)
 {
     _fetchPolicy = fetchPolicy;
     _pipelineName = pipelineName;
     _elementStore = elementStore;
 }
예제 #6
0
 public DatumProviderFactory(IDocumentBrowser webScrapSC, IFetchPolicy fetchPolicy)
     : this(webScrapSC, fetchPolicy, null)
 {
 }
예제 #7
0
파일: Pipeline.cs 프로젝트: zonaid/ncqrs
 public Pipeline(string name, IElementProcessor elementProcessor, IBrowsableElementStore elementStore, IFetchPolicy fetchPolicy)
 {
     _name          = name;
     _elementStore  = elementStore;
     _demultiplexer = new Demultiplexer();
     _demultiplexer.EventDemultiplexed += OnDemultiplexed;
     _processor = new PipelineProcessor(elementProcessor);
     _processor.EventProcessed += OnEventProcessed;
     _fetcher = new ElementFetcher(fetchPolicy, _elementStore, name);
     _fetcher.ElementFetched += OnElementFetched;
     _fetchTimer              = new Timer(x => EvaluateFetchPolicy(), null, TimeSpan.Zero, TimeSpan.FromSeconds(1));
 }
예제 #8
0
 public ElementFetcher(IFetchPolicy fetchPolicy, IBrowsableElementStore elementStore, string pipelineName)
 {
     _fetchPolicy  = fetchPolicy;
     _pipelineName = pipelineName;
     _elementStore = elementStore;
 }
예제 #9
0
        private static IDatumProvider CreateProvider(DatumLocator datum, IFetchPolicy fetchPolicy)
        {
            var factory = new DatumProviderFactory(Engine.ServiceProvider.Browser(), fetchPolicy);

            return(factory.Create(datum));
        }
예제 #10
0
 public DatumProviderFactory( IDocumentBrowser webScrapSC, IFetchPolicy fetchPolicy )
     : this(webScrapSC, fetchPolicy, null)
 {
 }