private Uri GetRequestUri <T>(GetByContainerAndKeyCommand <T> command) { string requestUri = this.GetMessageBase <T>(); requestUri += $"/{command.Container}/{command.Key}"; 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>(GetByContainerAndKeyCommand <T> command) { return(this.GetRequestMessage <T>(this.GetRequestUri <T>(command), null, HttpMethod)); }
public GetByContainerAndKeyHttpApiCommand(GetByContainerAndKeyCommand <T> command, IRequestMessageBuilderFactory requestMessageBuilderFactory) { this.command = command; this.requestBuilder = requestMessageBuilderFactory.GetRequestMessageBuilder <GetByContainerAndKeyMessageBuilder>(); }