/// <summary> /// Gets the list of Predictions for the given Individual and Property /// </summary> /// <param name="individual">QName of an Inidividual</param> /// <param name="property">QName of a Property</param> /// <param name="callback">Callback to invoke when the operation completes</param> /// <param name="state">State to pass to the callback</param> public void Predict(String individual, String property, NodeListCallback callback, Object state) { this.PredictRaw(individual, property, (g, s) => { List <INode> predictions = (from t in g.Triples select t.Object).Distinct().ToList(); callback(predictions, state); }, state); }
/// <summary> /// Gets the list of Predictions for the given Individual and Property. /// </summary> /// <param name="individual">QName of an Inidividual.</param> /// <param name="property">QName of a Property.</param> /// <param name="callback">Callback to invoke when the operation completes.</param> /// <param name="state">State to pass to the callback.</param> /// <remarks> /// If the operation succeeds the callback will be invoked normally, if there is an error the callback will be invoked with a instance of <see cref="AsyncError"/> passed as the state which provides access to the error message and the original state passed in. /// </remarks> public void Predict(String individual, String property, NodeListCallback callback, Object state) { PredictRaw(individual, property, (g, s) => { if (s is AsyncError) { callback(null, s); } else { List <INode> predictions = (from t in g.Triples select t.Object).Distinct().ToList(); callback(predictions, state); } }, state); }
/// <summary> /// Gets the list of Predictions for the given Individual and Property /// </summary> /// <param name="individual">QName of an Inidividual</param> /// <param name="property">QName of a Property</param> /// <param name="callback">Callback to invoke when the operation completes</param> /// <param name="state">State to pass to the callback</param> public void Predict(String individual, String property, NodeListCallback callback, Object state) { this.PredictRaw(individual, property, (g, s) => { List<INode> predictions = (from t in g.Triples select t.Object).Distinct().ToList(); callback(predictions, state); }, state); }