コード例 #1
0
        public IEnumerable <object> GetData(CrawlJobData jobData)
        {
            if (!(jobData is DMSCrawlJobData dmscrawlJobData))
            {
                yield break;
            }

            var client = clientFactory.CreateNew(dmscrawlJobData);

            //retrieve data from provider and yield objects
        }
コード例 #2
0
        public override async Task <AccountInformation> GetAccountInformation(ExecutionContext context, [NotNull] CrawlJobData jobData, Guid organizationId, Guid userId, Guid providerDefinitionId)
        {
            if (jobData == null)
            {
                throw new ArgumentNullException(nameof(jobData));
            }

            if (!(jobData is DMSCrawlJobData dmsCrawlJobData))
            {
                throw new Exception("Wrong CrawlJobData type");
            }

            var client = _dmsClientFactory.CreateNew(dmsCrawlJobData);

            return(await Task.FromResult(client.GetAccountInformation()));
        }