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 ODataCrawlJobData odataCrawlJobData)) { throw new Exception("Wrong CrawlJobData type"); } var client = _odataClientFactory.CreateNew(odataCrawlJobData); return(await Task.FromResult(client.GetAccountInformation())); }
public IEnumerable <object> GetData(CrawlJobData jobData) { if (!(jobData is ODataCrawlJobData odatacrawlJobData)) { yield break; } var client = clientFactory.CreateNew(odatacrawlJobData); //retrieve data from provider and yield objects //TODO add example type foreach (var item in client.Get <Data>()) { yield return(item); } }