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 virtual Task <long> GetCountAsync(ICriterion filter)
        {
            var q = new AttributeUseMvosCountGetQuery();

            q.Filter = AttributeUseMvoProxyUtils.GetFilterQueryValueString(filter);
            var req = new AttributeUseMvosCountGetRequest();

            req.Query = q;
            var resp = await _ramlClient.AttributeUseMvosCount.Get(req);

            AttributeUseMvoProxyUtils.ThrowOnHttpResponseError(resp);
            return(long.Parse(await resp.RawContent.ReadAsStringAsync()));
        }
        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);
        }
Exemple #4
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 <IEnumerable <IAttributeUseMvoState> > GetAsync(ICriterion filter, IList <string> orders = null, int firstResult = 0, int maxResults = int.MaxValue, IList <string> fields = null)
        {
            IEnumerable <IAttributeUseMvoState> states = null;
            var q = new AttributeUseMvosGetQuery();

            q.FirstResult = firstResult;
            q.MaxResults  = maxResults;
            q.Sort        = AttributeUseMvoProxyUtils.GetOrdersQueryValueString(orders);
            q.Fields      = AttributeUseMvoProxyUtils.GetReturnedFieldsQueryValueString(fields, QueryFieldValueSeparator);
            q.Filter      = AttributeUseMvoProxyUtils.GetFilterQueryValueString(filter);
            var req = new AttributeUseMvosGetRequest();

            req.Query = q;
            var resp = await _ramlClient.AttributeUseMvos.Get(req);

            AttributeUseMvoProxyUtils.ThrowOnHttpResponseError(resp);
            states = resp.Content;
            return(states);
        }
        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);
        }
Exemple #8
0
        public async virtual Task <long> GetCountAsync(ICriterion filter)
        {
            var q = new AttributeUseMvosCountGetQuery();

            q.Filter = AttributeUseMvoProxyUtils.GetFilterQueryValueString(filter);
            var req = new AttributeUseMvosCountGetRequest();

            req.Query = q;
            var resp = await _ramlClient.AttributeUseMvosCount.Get(req);

            AttributeUseMvoProxyUtils.ThrowOnHttpResponseError(resp);
            string str = await resp.RawContent.ReadAsStringAsync();

            if (str.StartsWith("\""))
            {
                str = str.Substring(1);
            }
            if (str.EndsWith("\""))
            {
                str = str.Substring(0, str.Length - 1);
            }
            return(long.Parse(str));
        }