コード例 #1
0
        internal static byte[] ToBytes(this BitOpType value)
        {
            var result = RedisConstants.And;

            if (value == BitOpType.Not)
            {
                result = RedisConstants.Not;
            }
            else if (value == BitOpType.Or)
            {
                result = RedisConstants.Or;
            }
            else if (value == BitOpType.Xor)
            {
                result = RedisConstants.Xor;
            }

            return(result);
        }
コード例 #2
0
        public Task <long> BitOpAsync(BitOpType bitOp, string destKey, params string[] keys)
        {
            var request = ComposeRequest(RedisConstants.BitOp, bitOp.ToBytes(), destKey.ToBytes(), keys);

            return(IntegerCommand(request));
        }