Beispiel #1
0
        /// <summary>
        /// SORT : https://redis.io/commands/sort
        /// </summary>
        public Task <long> SortAndStore(RedisList <T> destination, long skip = 0, long take = -1, Order order = Order.Ascending, SortType sortType = SortType.Numeric, /*RedisValue by = default, RedisValue[] get = null,*/ CommandFlags flags = CommandFlags.None)
        {
            //--- I don't know if serialization is necessary or not, so I will fix the default value.
            RedisValue by = default;

            RedisValue[] get = default;
            return(this.Connection.Database.SortAndStoreAsync(destination.Key, this.Key, skip, take, order, sortType, by, get, flags));
        }
Beispiel #2
0
        /// <summary>
        /// RPOPLPUSH : https://redis.io/commands/rpoplpush
        /// </summary>
        public async Task <RedisResult <T> > RightPopLeftPush(RedisList <T> destination, CommandFlags flags = CommandFlags.None)
        {
            var value = await this.Connection.Database.ListRightPopLeftPushAsync(this.Key, destination.Key, flags).ConfigureAwait(false);

            return(value.ToResult <T>(this.Connection.Converter));
        }