Esempio n. 1
0
        public Task <long> SCard(string key) =>
        ExecuteWithSession(async session =>
        {
            var result = await _setClient.SCard(session, key).ConfigureAwait(false);

            if (result.IsFailure)
            {
                throw new RedisException(
                    $"Error while getting the cardinality of the set '{key}' [REDIS CODE: {result.Error}]",
                    result.Exception);
            }

            return(result.Value);
        });