/// <summary> /// Publishes an EchoEvent. /// </summary> /// <param name="request">The data to be echo'd back to the client</param> /// <returns>The data sent by the client</returns> private ServiceBusResponse addCompanyReview(AddCompanyReviewRequest request) { if (authenticated == false) { return(new ServiceBusResponse(false, "Error: You must be logged in to use the echo reverse functionality.")); } AddReviewEvent reviewEvent = new AddReviewEvent { review = request.review }; //This function publishes the EchoEvent class. All endpoint instances that subscribed to these events prior //to the event being published will have their respictive handler functions called with the EchoEvent object //as one of the parameters eventPublishingEndpoint.Publish(reviewEvent); return(new ServiceBusResponse(true, "Review Saved.")); //might have to change this later... TODO!!! }
public void InvokeAddReview(Product product) { AddReviewEvent?.Invoke(this, new AddReviewEvantArgs { Product = product }); }