/// <summary> /// Sends a scoring request and waits for the response. /// </summary> /// <param name="scoreRequest">The score request object with response info in it.</param> public ItemScoreResponse SendRequest(string url, ItemScoreRequest scoreRequest) { ItemScoreResponse scoreResponse = HttpWebHelper.SendAndReadXml <ItemScoreRequest, ItemScoreResponse>(url, scoreRequest); Log("ItemScoringClient SendRequest"); return(scoreResponse); }
/// <summary> /// Send a score request and do not wait for a response. /// </summary> /// <param name="scoreRequest">The score request object with response info in it.</param> /// <param name="completedCallback">A function to be called once the score request is recieved by the scoring server.</param> public void SendRequestAsync(string url, ItemScoreRequest scoreRequest, Action <ItemScoreResponse> completedCallback) { _threadPool.Enqueue(() => SendRequest(url, scoreRequest)); }