/// <summary> /// Opens a new connection to the GBIF web service and tries to return processed update-rows for the "data-page" as requested by the dataSetKey combined with the pageNumber and pageSize parameters /// </summary> /// <param name="mappings"></param> /// <param name="context"></param> /// <param name="pageNumber"></param> /// <param name="pageSize"></param> /// <returns></returns> private List <HarvestSpeciesObservation> GetSpeciesObservations(List <HarvestMapping> mappings, WebServiceContext context, Int64 pageNumber, Int64 pageSize) { var createdSpeciesObservations = new List <HarvestSpeciesObservation>(); GbifDataSetsJson datasetData = GetSpeciesObservationPage(pageNumber, pageSize); if (datasetData.IsNotNull()) { // Convert and process species observations. foreach (Dictionary <string, object> speciesObservations in datasetData.Results) { createdSpeciesObservations.Add(ProcessInstance.ProcessObservation(GetWebData(speciesObservations), mappings, context)); } } return(createdSpeciesObservations); }