public async void Get()
        {
            await DB.Flushall();

            Write(await DB.Get <Employee>("nonexisting"));
            Write(await DB.Set("emp3", GetEmployee(3)));
            Write(await DB.Get <Employee>("emp3"));
        }
Exemple #2
0
        private async void RunTest()
        {
            while (true)
            {
                for (int i = 10248; i <= 11077; i++)
                {
                    await RedisDB.Get <Northwind.Data.Order>(i.ToString());

                    if (!this.Increment())
                    {
                        return;
                    }
                }
            }
        }
Exemple #3
0
 public async override Task Execute()
 {
     await RedisDB.Get <Northwind.Data.Order>(OrderHelper.GetOrderID().ToString());
 }
Exemple #4
0
        public async void GetSetBytes()
        {
            var data = Encoding.UTF8.GetBytes("*****@*****.**");
            await DB.Set("bytes", new ArraySegment <byte>(data));

            var result = await DB.Get <ArraySegment <byte> >("bytes");

            Assert.Equal <string>(Encoding.UTF8.GetString(result.Array, 0, result.Count), "*****@*****.**");
        }
        public async void GetSetList()
        {
            await DB.Flushall();

            Write(await DB.Set("employees", DataHelper.Defalut.Employees));
            Write(await DB.Get <List <Employee> >("employees1"));
        }