public Task <DownstreamResponse> Aggregate(List <DownstreamContext> responses) { var customerWithProduct = new CustomerWithProduct { Customer = responses[0].DownstreamResponse.Content.ReadAsAsync <Customer>().Result, Product = responses[1].DownstreamResponse.Content.ReadAsAsync <Product>().Result }; HttpResponseMessage response = new HttpResponseMessage(); response.Content = new ObjectContent <CustomerWithProduct>(customerWithProduct, new JsonMediaTypeFormatter()); return(Task.FromResult(new DownstreamResponse(response))); }
public bool Equals(CustomerWithProduct obj) { return(Name.Equals(obj.Name) && Product.Equals(obj.Product)); }