public async Task WhenAsync(MergePatchAttributeUseMvoDto c)
        {
            var idObj         = AttributeUseMvoProxyUtils.ToIdString((c as IMergePatchAttributeUseMvo).AttributeSetAttributeUseId);
            var uriParameters = new AttributeUseMvoUriParameters();

            uriParameters.Id = idObj;

            var req  = new AttributeUseMvoPatchRequest(uriParameters, (MergePatchAttributeUseMvoDto)c);
            var resp = await _ramlClient.AttributeUseMvo.Patch(req);

            AttributeUseMvoProxyUtils.ThrowOnHttpResponseError(resp);
        }
        public async Task <IAttributeUseMvoStateEvent> GetStateEventAsync(AttributeSetAttributeUseId attributeSetAttributeUseId, long version)
        {
            var idObj         = AttributeUseMvoProxyUtils.ToIdString(attributeSetAttributeUseId);
            var uriParameters = new AttributeUseMvoStateEventUriParameters();

            uriParameters.Id      = idObj;
            uriParameters.Version = version.ToString();

            var req  = new AttributeUseMvoStateEventGetRequest(uriParameters);
            var resp = await _ramlClient.AttributeUseMvoStateEvent.Get(req);

            AttributeUseMvoProxyUtils.ThrowOnHttpResponseError(resp);
            return(resp.Content);
        }
Ejemplo n.º 3
0
        public async Task <IAttributeUseMvoState> GetHistoryStateAsync(AttributeSetAttributeUseId attributeSetAttributeUseId, long version)
        {
            var idObj         = AttributeUseMvoProxyUtils.ToIdString(attributeSetAttributeUseId);
            var uriParameters = new AttributeUseMvoHistoryStateUriParameters();

            uriParameters.Id      = idObj;
            uriParameters.Version = version.ToString();

            var req  = new AttributeUseMvoHistoryStateGetRequest(uriParameters);
            var resp = await _ramlClient.AttributeUseMvoHistoryState.Get(req);

            AttributeUseMvoProxyUtils.ThrowOnHttpResponseError(resp);
            return((resp.Content == null) ? null : resp.Content.ToAttributeUseMvoState());
        }
        public async Task <IAttributeUseMvoState> GetAsync(AttributeSetAttributeUseId attributeSetAttributeUseId)
        {
            IAttributeUseMvoState state = null;
            var idObj         = AttributeUseMvoProxyUtils.ToIdString(attributeSetAttributeUseId);
            var uriParameters = new AttributeUseMvoUriParameters();

            uriParameters.Id = idObj;

            var req = new AttributeUseMvoGetRequest(uriParameters);

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

            AttributeUseMvoProxyUtils.ThrowOnHttpResponseError(resp);
            state = resp.Content;
            return(state);
        }
        public async Task WhenAsync(DeleteAttributeUseMvoDto c)
        {
            var idObj         = AttributeUseMvoProxyUtils.ToIdString((c as IDeleteAttributeUseMvo).AttributeSetAttributeUseId);
            var uriParameters = new AttributeUseMvoUriParameters();

            uriParameters.Id = idObj;

            var q = new AttributeUseMvoDeleteQuery();

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

            var req = new AttributeUseMvoDeleteRequest(uriParameters);

            req.Query = q;

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

            AttributeUseMvoProxyUtils.ThrowOnHttpResponseError(resp);
        }