public async Task <OntologyInfo> ExecuteGetOntologyInfo(SparqlConnection connection) { // get the ontology info information related to this connection. SimpleResultSet interrimResult = null; OntologyInfo retval = null; conf.SetServiceEndpoint(mappingPrefix + ontologyInfoDetailsEndpoint); String connectionJsonString = connection.ToJson().ToString(); this.parameterJson.Add("jsonRenderedSparqlConnection", JsonValue.CreateStringValue(connectionJsonString)); try { // talk to the service to get the ontology info details. //JsonObject obj = (JsonObject)this.Execute().Result; JsonObject objExec = (JsonObject)(await this.Execute()); interrimResult = SimpleResultSet.FromJson(objExec); interrimResult.ThrowExceptionIfUnsuccessful(); // get the actual value from the results JsonObject obj = interrimResult.GetResultJsonObject("ontologyInfo"); // build an oInfo from it. retval = new OntologyInfo(); retval.AddJson(obj); } finally { conf.SetServiceEndpoint(null); this.parameterJson.Remove("jsonRenderedSparqlConnection"); } // return the OntologyInfo return(retval); }