/// <summary> /// Notify the CompanyReviewService that a new review has been written /// </summary> /// <param name="request">Information about the review that was written</param> /// <param name="context">Information about the calling endpoint</param> /// <returns>Nothing</returns> public Task Handle(SaveCompanyReviewRequest request, IMessageHandlerContext context) { CompanyReviewAPIRequest webRequest = new CompanyReviewAPIRequest(); ServiceBusResponse response = webRequest.saveCompanyReview(request); return(context.Reply(response)); }
/// <summary> /// Makes a call to the CompanyReviewService's Web Api /// </summary> /// <param name="request">Object containing information about the request</param> /// <param name="context">Information regarding the calling endpoint</param> /// <returns></returns> public Task Handle(GetCompanyReviewsRequest request, IMessageHandlerContext context) { CompanyReviewAPIRequest webRequest = new CompanyReviewAPIRequest(); GetCompanyReviewsResponse response = webRequest.getCompanyReviews(request); return(context.Reply(response)); }