예제 #1
0
        private Uri GetRequestUri <T>(ApplyResourceEditCommand <T> command)
        {
            string requestUri = this.GetMessageBase <OrderEdit>();

            requestUri += $"/{command.Id}/apply";
            return(new Uri(requestUri, UriKind.Relative));
        }
예제 #2
0
        private HttpContent GetHttpContent <T>(ApplyResourceEditCommand <T> command)
        {
            var requestBody = new
            {
                EditVersion     = command.EditVersion,
                ResourceVersion = command.ResourceVersion
            };

            return(new StringContent(this.serializerService.Serialize(requestBody)));
        }
예제 #3
0
 public HttpRequestMessage GetRequestMessage <T>(ApplyResourceEditCommand <T> command)
 {
     return(this.GetRequestMessage <T>(this.GetRequestUri <T>(command), this.GetHttpContent(command), HttpMethod));
 }
예제 #4
0
 public ApplyResourceEditHttpApiCommand(ApplyResourceEditCommand <T> command, IRequestMessageBuilderFactory requestMessageBuilderFactory)
 {
     this.command        = command;
     this.requestBuilder = requestMessageBuilderFactory.GetRequestMessageBuilder <ApplyResourceEditRequestMessageBuilder>();
 }