コード例 #1
0
 public FileMetaDataClueProducer(IClueFactory factory, IHubSpotFileFetcher fileFetcher, ILogger log, ApplicationContext context, IAgentJobProcessorState <CrawlJobData> state)
 {
     _factory     = factory ?? throw new ArgumentNullException(nameof(factory));
     _fileFetcher = fileFetcher ?? throw new ArgumentNullException(nameof(_fileFetcher));
     _log         = log ?? throw new ArgumentNullException(nameof(log));
     _context     = context ?? throw new ArgumentNullException(nameof(context));
     _state       = state ?? throw new ArgumentNullException(nameof(state));
 }
コード例 #2
0
        public FileMetadataClueProducer([NotNull] IClueFactory factory, ILogger log, BoxFileUriBuilder uriBuilder, IDropBoxClientFactory clientFactory, IAgentJobProcessorState <CrawlJobData> state, ApplicationContext context)
        {
            _clientFactory = clientFactory ?? throw new ArgumentNullException(nameof(clientFactory));
            _factory       = factory ?? throw new ArgumentNullException(nameof(factory));
            _context       = context ?? throw new ArgumentNullException(nameof(context));
            _log           = log ?? throw new ArgumentNullException(nameof(log));
            _uriBuilder    = uriBuilder ?? throw new ArgumentNullException(nameof(uriBuilder));
            _state         = state ?? throw new ArgumentNullException(nameof(state));
            _context       = context;

            if (state.JobData is DropBoxCrawlJobData jobData)
            {
                _jobData = jobData;
            }
            else
            {
                throw new ArgumentException("state parameter must have JobData of type DropBoxCrawlJobData");
            }

            if (factory is DropBoxClueFactory dropBoxClueFactory)
            {
                _providerRoot = dropBoxClueFactory.ProviderRoot;
            }
        }
コード例 #3
0
 public DropBoxCrawler(IDropBoxClientFactory clientFactory, ILogger log, IAgentJobProcessorState <CrawlJobData> state)
 {
     _clientFactory = clientFactory ?? throw new ArgumentNullException(nameof(clientFactory));
     _log           = log ?? throw new ArgumentNullException(nameof(log));
     _state         = state;
 }
コード例 #4
0
 public DriveItemClueProducer(IClueFactory factory, IAgentJobProcessorState <OneDriveCrawlJobData> state, ApplicationContext appContext)
 {
     this.factory    = factory;
     this.state      = state;
     this.appContext = appContext;
 }
コード例 #5
0
 public HubSpotFileIndexer([NotNull] IAgentJobProcessorState <CrawlJobData> args, [NotNull] ApplicationContext context)
 {
     _args    = args ?? throw new ArgumentNullException(nameof(args));
     _context = context ?? throw new ArgumentNullException(nameof(context));
 }