示例#1
0
        public async Task WhenAsync(MergePatchUomDto c)
        {
            var idObj         = (c as IMergePatchUom).UomId;
            var uriParameters = new UomUriParameters();

            uriParameters.Id = idObj;

            var req  = new UomPatchRequest(uriParameters, (MergePatchUomDto)c);
            var resp = await _ramlClient.Uom.Patch(req);

            UomProxyUtils.ThrowOnHttpResponseError(resp);
        }
示例#2
0
        public async Task <IUomState> GetAsync(string uomId)
        {
            IUomState state         = null;
            var       idObj         = uomId;
            var       uriParameters = new UomUriParameters();

            uriParameters.Id = idObj;

            var req = new UomGetRequest(uriParameters);

            var resp = await _ramlClient.Uom.Get(req);

            UomProxyUtils.ThrowOnHttpResponseError(resp);
            state = (resp.Content == null) ? null : resp.Content.ToUomState();
            return(state);
        }
示例#3
0
        public async Task WhenAsync(DeleteUomDto c)
        {
            var idObj         = (c as IDeleteUom).UomId;
            var uriParameters = new UomUriParameters();

            uriParameters.Id = idObj;

            var q = new UomDeleteQuery();

            q.CommandId   = c.CommandId;
            q.RequesterId = c.RequesterId;
            q.Version     = Convert.ToString(c.Version);

            var req = new UomDeleteRequest(uriParameters);

            req.Query = q;

            var resp = await _ramlClient.Uom.Delete(req);

            UomProxyUtils.ThrowOnHttpResponseError(resp);
        }