public async virtual Task <long> GetCountAsync(ICriterion filter) { var q = new WarehousesCountGetQuery(); q.Filter = WarehouseProxyUtils.GetFilterQueryValueString(filter); var req = new WarehousesCountGetRequest(); req.Query = q; var resp = await _ramlClient.WarehousesCount.Get(req); WarehouseProxyUtils.ThrowOnHttpResponseError(resp); return(long.Parse(await resp.RawContent.ReadAsStringAsync())); }
public async virtual Task <long> GetCountAsync(ICriterion filter) { var q = new WarehousesCountGetQuery(); q.Filter = WarehouseProxyUtils.GetFilterQueryValueString(filter); var req = new WarehousesCountGetRequest(); req.Query = q; var resp = await _ramlClient.WarehousesCount.Get(req); WarehouseProxyUtils.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)); }