public CompanyReviewResponse searchCompanyReview(CompanyReviewSearchRequest request) { send(request); ServiceBusResponse resp = readUntilEOF(); return((CompanyReviewResponse)resp); }
/// <summary> /// Sends the data to the echo service, and returns the response. /// </summary> /// <param name="request">The data sent by the client</param> /// <returns>The response from the echo service</returns> private ServiceBusResponse searchCompanyReviews(CompanyReviewSearchRequest request) { if (authenticated == false) { return(new ServiceBusResponse(false, "Error: You must be logged in to use the echo reverse functionality.")); } // This class indicates to the request function where SendOptions sendOptions = new SendOptions(); sendOptions.SetDestination("ReviewService"); // The Request<> funtion itself is an asynchronous operation. However, since we do not want to continue execution until the Request // function runs to completion, we call the ConfigureAwait, GetAwaiter, and GetResult functions to ensure that this thread // will wait for the completion of Request before continueing. return(requestingEndpoint.Request <ServiceBusResponse>(request, sendOptions). ConfigureAwait(false).GetAwaiter().GetResult()); }