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