private Uri GetRequestUri <T>(GetMatchingCommand <T> command) { string requestUri = this.GetMessageBase <T>(); requestUri += "/matching"; List <KeyValuePair <string, string> > queryStringParameters = new List <KeyValuePair <string, string> >(); queryStringParameters.AddRange(this.GetAdditionalParameters(command.AdditionalParameters)); queryStringParameters.ForEach(x => { requestUri = QueryHelpers.AddQueryString(requestUri, x.Key, x.Value); }); return(new Uri(requestUri, UriKind.Relative)); }
public HttpRequestMessage GetRequestMessage <T>(GetMatchingCommand <T> command) { return(this.GetRequestMessage <T>(this.GetRequestUri <T>(command), this.GetHttpContent <T>(command), HttpMethod)); }
private HttpContent GetHttpContent <T>(GetMatchingCommand <T> command) { return(new StringContent(this.serializerService.Serialize(command.Parameters))); }
public GetMatchingHttpApiCommand(GetMatchingCommand <T> command, IRequestMessageBuilderFactory requestMessageBuilderFactory) { this.command = command; this.requestBuilder = requestMessageBuilderFactory.GetRequestMessageBuilder <GetMatchingRequestMessageBuilder>(); }