コード例 #1
0
 public void Patch(string id, [FromBody] MergePatchDocumentTypeDto value)
 {
     try {
         DocumentTypesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _documentTypeApplicationService.When(value as IMergePatchDocumentType);
     } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
コード例 #2
0
        public async Task WhenAsync(MergePatchDocumentTypeDto c)
        {
            var idObj         = (c as IMergePatchDocumentType).DocumentTypeId;
            var uriParameters = new DocumentTypeUriParameters();

            uriParameters.Id = idObj;

            var req  = new DocumentTypePatchRequest(uriParameters, (MergePatchDocumentTypeDto)c);
            var resp = await _ramlClient.DocumentType.Patch(req);

            DocumentTypeProxyUtils.ThrowOnHttpResponseError(resp);
        }
コード例 #3
0
 public void When(MergePatchDocumentTypeDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }