public async Task WhenAsync(MergePatchAttributeSetInstanceExtensionFieldGroupDto c)
        {
            var idObj         = (c as IMergePatchAttributeSetInstanceExtensionFieldGroup).Id;
            var uriParameters = new AttributeSetInstanceExtensionFieldGroupUriParameters();

            uriParameters.Id = idObj;

            var req  = new AttributeSetInstanceExtensionFieldGroupPatchRequest(uriParameters, (MergePatchAttributeSetInstanceExtensionFieldGroupDto)c);
            var resp = await _ramlClient.AttributeSetInstanceExtensionFieldGroup.Patch(req);

            AttributeSetInstanceExtensionFieldGroupProxyUtils.ThrowOnHttpResponseError(resp);
        }
        public async virtual Task <long> GetCountAsync(ICriterion filter)
        {
            var q = new AttributeSetInstanceExtensionFieldGroupsCountGetQuery();

            q.Filter = AttributeSetInstanceExtensionFieldGroupProxyUtils.GetFilterQueryValueString(filter);
            var req = new AttributeSetInstanceExtensionFieldGroupsCountGetRequest();

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

            AttributeSetInstanceExtensionFieldGroupProxyUtils.ThrowOnHttpResponseError(resp);
            return(long.Parse(await resp.RawContent.ReadAsStringAsync()));
        }
        public async virtual Task <IAttributeSetInstanceExtensionFieldState> GetAttributeSetInstanceExtensionFieldAsync(string groupId, string index)
        {
            var uriParameters = new AttributeSetInstanceExtensionFieldUriParameters();

            uriParameters.GroupId = groupId;
            uriParameters.Index   = index;

            var req  = new AttributeSetInstanceExtensionFieldGetRequest(uriParameters);
            var resp = await _ramlClient.AttributeSetInstanceExtensionField.Get(req);

            AttributeSetInstanceExtensionFieldGroupProxyUtils.ThrowOnHttpResponseError(resp);
            return(resp.Content);
        }
        public async Task <IAttributeSetInstanceExtensionFieldGroupStateEvent> GetStateEventAsync(string id, long version)
        {
            var idObj         = id;
            var uriParameters = new AttributeSetInstanceExtensionFieldGroupStateEventUriParameters();

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

            var req  = new AttributeSetInstanceExtensionFieldGroupStateEventGetRequest(uriParameters);
            var resp = await _ramlClient.AttributeSetInstanceExtensionFieldGroupStateEvent.Get(req);

            AttributeSetInstanceExtensionFieldGroupProxyUtils.ThrowOnHttpResponseError(resp);
            return(resp.Content);
        }
示例#5
0
        public async Task <IAttributeSetInstanceExtensionFieldGroupState> GetHistoryStateAsync(string id, long version)
        {
            var idObj         = id;
            var uriParameters = new AttributeSetInstanceExtensionFieldGroupHistoryStateUriParameters();

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

            var req  = new AttributeSetInstanceExtensionFieldGroupHistoryStateGetRequest(uriParameters);
            var resp = await _ramlClient.AttributeSetInstanceExtensionFieldGroupHistoryState.Get(req);

            AttributeSetInstanceExtensionFieldGroupProxyUtils.ThrowOnHttpResponseError(resp);
            return((resp.Content == null) ? null : resp.Content.ToAttributeSetInstanceExtensionFieldGroupState());
        }
        public async Task <IAttributeSetInstanceExtensionFieldGroupState> GetAsync(string id)
        {
            IAttributeSetInstanceExtensionFieldGroupState state = null;
            var idObj         = id;
            var uriParameters = new AttributeSetInstanceExtensionFieldGroupUriParameters();

            uriParameters.Id = idObj;

            var req = new AttributeSetInstanceExtensionFieldGroupGetRequest(uriParameters);

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

            AttributeSetInstanceExtensionFieldGroupProxyUtils.ThrowOnHttpResponseError(resp);
            state = resp.Content;
            return(state);
        }
        public async Task <IEnumerable <IAttributeSetInstanceExtensionFieldGroupState> > GetAsync(ICriterion filter, IList <string> orders = null, int firstResult = 0, int maxResults = int.MaxValue, IList <string> fields = null)
        {
            IEnumerable <IAttributeSetInstanceExtensionFieldGroupState> states = null;
            var q = new AttributeSetInstanceExtensionFieldGroupsGetQuery();

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

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

            AttributeSetInstanceExtensionFieldGroupProxyUtils.ThrowOnHttpResponseError(resp);
            states = resp.Content;
            return(states);
        }
        public async Task WhenAsync(DeleteAttributeSetInstanceExtensionFieldGroupDto c)
        {
            var idObj         = (c as IDeleteAttributeSetInstanceExtensionFieldGroup).Id;
            var uriParameters = new AttributeSetInstanceExtensionFieldGroupUriParameters();

            uriParameters.Id = idObj;

            var q = new AttributeSetInstanceExtensionFieldGroupDeleteQuery();

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

            var req = new AttributeSetInstanceExtensionFieldGroupDeleteRequest(uriParameters);

            req.Query = q;

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

            AttributeSetInstanceExtensionFieldGroupProxyUtils.ThrowOnHttpResponseError(resp);
        }
示例#9
0
        public async virtual Task <long> GetCountAsync(ICriterion filter)
        {
            var q = new AttributeSetInstanceExtensionFieldGroupsCountGetQuery();

            q.Filter = AttributeSetInstanceExtensionFieldGroupProxyUtils.GetFilterQueryValueString(filter);
            var req = new AttributeSetInstanceExtensionFieldGroupsCountGetRequest();

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

            AttributeSetInstanceExtensionFieldGroupProxyUtils.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));
        }