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()));
        }
Example #2
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));
        }