示例#1
0
        public IEnumerable <object> GetData(CrawlJobData jobData)
        {
            if (!(jobData is NavisionCrawlJobData navisioncrawlJobData))
            {
                yield break;
            }

            var client = clientFactory.CreateNew(navisioncrawlJobData);

            //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 NavisionCrawlJobData navisionCrawlJobData))
            {
                throw new Exception("Wrong CrawlJobData type");
            }

            var client = _navisionClientFactory.CreateNew(navisionCrawlJobData);

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