예제 #1
0
        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));
        }
예제 #2
0
 public HttpRequestMessage GetRequestMessage <T>(GetByContainerAndKeyCommand <T> command)
 {
     return(this.GetRequestMessage <T>(this.GetRequestUri <T>(command), null, HttpMethod));
 }
예제 #3
0
 public GetByContainerAndKeyHttpApiCommand(GetByContainerAndKeyCommand <T> command, IRequestMessageBuilderFactory requestMessageBuilderFactory)
 {
     this.command        = command;
     this.requestBuilder = requestMessageBuilderFactory.GetRequestMessageBuilder <GetByContainerAndKeyMessageBuilder>();
 }