Exemplo n.º 1
0
        public async Task WhenAsync(MergePatchAttributeSetInstanceDto c)
        {
            var idObj         = (c as IMergePatchAttributeSetInstance).AttributeSetInstanceId;
            var uriParameters = new AttributeSetInstanceUriParameters();

            uriParameters.Id = idObj;

            var req  = new AttributeSetInstancePatchRequest(uriParameters, (MergePatchAttributeSetInstanceDto)c);
            var resp = await _ramlClient.AttributeSetInstance.Patch(req);

            AttributeSetInstanceProxyUtils.ThrowOnHttpResponseError(resp);
        }
Exemplo n.º 2
0
        public async Task <IAttributeSetInstanceState> GetAsync(string attributeSetInstanceId)
        {
            IAttributeSetInstanceState state = null;
            var idObj         = attributeSetInstanceId;
            var uriParameters = new AttributeSetInstanceUriParameters();

            uriParameters.Id = idObj;

            var req = new AttributeSetInstanceGetRequest(uriParameters);

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

            AttributeSetInstanceProxyUtils.ThrowOnHttpResponseError(resp);
            state = resp.Content;
            return(state);
        }
Exemplo n.º 3
0
        public async Task WhenAsync(DeleteAttributeSetInstanceDto c)
        {
            var idObj         = (c as IDeleteAttributeSetInstance).AttributeSetInstanceId;
            var uriParameters = new AttributeSetInstanceUriParameters();

            uriParameters.Id = idObj;

            var q = new AttributeSetInstanceDeleteQuery();

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

            var req = new AttributeSetInstanceDeleteRequest(uriParameters);

            req.Query = q;

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

            AttributeSetInstanceProxyUtils.ThrowOnHttpResponseError(resp);
        }