private Uri GetRequestUri <T>(DeleteByContainerAndKeyCommand <T> command) { string requestUri = this.GetMessageBase <T>(); requestUri += $"/{command.Container}/{command.Key}"; List <KeyValuePair <string, string> > queryStringParameters = new List <KeyValuePair <string, string> >(); if (command.Expand != null) { queryStringParameters.AddRange(command.Expand.Select(x => new KeyValuePair <string, string>("expand", x))); } queryStringParameters.AddRange(this.GetAdditionalParameters(command.AdditionalParameters)); if (command.DataErasure != null) { queryStringParameters.Add(new KeyValuePair <string, string>("dataErasure", command.DataErasure.ToString())); } queryStringParameters.ForEach(x => { requestUri = QueryHelpers.AddQueryString(requestUri, x.Key, x.Value); }); return(new Uri(requestUri, UriKind.Relative)); }
public HttpRequestMessage GetRequestMessage <T>(DeleteByContainerAndKeyCommand <T> command) { return(this.GetRequestMessage <T>(this.GetRequestUri <T>(command), null, HttpMethod)); }
public DeleteByContainerAndKeyHttpApiCommand(DeleteByContainerAndKeyCommand <T> command, IRequestMessageBuilderFactory requestMessageBuilderFactory) { this.command = command; this.requestBuilder = requestMessageBuilderFactory.GetRequestMessageBuilder <DeleteByContainerAndKeyMessageBuilder>(); }