public async Task WhenAsync(MergePatchAttributeSetDto c) { var idObj = (c as IMergePatchAttributeSet).AttributeSetId; var uriParameters = new AttributeSetUriParameters(); uriParameters.Id = idObj; var req = new AttributeSetPatchRequest(uriParameters, (MergePatchAttributeSetDto)c); var resp = await _ramlClient.AttributeSet.Patch(req); AttributeSetProxyUtils.ThrowOnHttpResponseError(resp); }
public async Task <IAttributeSetState> GetAsync(string attributeSetId) { IAttributeSetState state = null; var idObj = attributeSetId; var uriParameters = new AttributeSetUriParameters(); uriParameters.Id = idObj; var req = new AttributeSetGetRequest(uriParameters); var resp = await _ramlClient.AttributeSet.Get(req); AttributeSetProxyUtils.ThrowOnHttpResponseError(resp); state = (resp.Content == null) ? null : resp.Content.ToAttributeSetState(); return(state); }
public async Task WhenAsync(DeleteAttributeSetDto c) { var idObj = (c as IDeleteAttributeSet).AttributeSetId; var uriParameters = new AttributeSetUriParameters(); uriParameters.Id = idObj; var q = new AttributeSetDeleteQuery(); q.CommandId = c.CommandId; q.RequesterId = c.RequesterId; q.Version = Convert.ToString(c.Version); var req = new AttributeSetDeleteRequest(uriParameters); req.Query = q; var resp = await _ramlClient.AttributeSet.Delete(req); AttributeSetProxyUtils.ThrowOnHttpResponseError(resp); }