Example #1
0
        static void ListTest(RedisDataBase db)
        {
            var key = "yswenliL";

            var i1 = db.LPush(key, "saea");

            var l1 = db.LLen(key);

            var i2 = db.LPush(key, new List <string>()
            {
                "redis", "socket"
            });

            var l2 = db.LLen(key);

            var i3 = db.LPushX(key, "a");

            db.LPushX(key, "a");

            var l3 = db.LLen(key);

            var i4 = db.RPush(key, "b");

            var l4 = db.LLen(key);

            var i5 = db.RPush(key, new List <string>()
            {
                "c", "d", "e"
            });

            var v6 = db.LInsert(key, "c", true, "f");

            var l5 = db.LLen(key);

            var i6 = db.RPushX(key, "f");

            var l6 = db.LLen(key);

            var v1 = db.LPop(key);

            var l7 = db.LLen(key);

            var v2 = db.BLPop(key, 10);

            var l8 = db.LLen(key);

            var v3 = db.BLPop(new List <string>()
            {
                key, "key1"
            }, 10);

            var l9 = db.LLen(key);

            var v4 = db.RpopLPush(key, "key1");

            var l10 = db.LLen(key);

            var l11 = db.LLen("key1");

            var v5 = db.LIndex(key, 0);

            var v7 = db.RPop(key);

            db.LSet(key, 0, "redis1");

            var v8 = db.LRang(key);

            var v9 = db.LTrim(key, 1, 3);

            var v10 = db.BRPop(key, 10);

            var v11 = db.BRPopLPush(key, "key1", 10);

            var v12 = db.LRemove(key, 100, "a");
        }