Пример #1
0
        public void MapSetdRemove()
        {
            JsonMapSet map = "HENRY_INFO";
            UserBase   ub  = new UserBase();

            ub.Name    = "henryfan";
            ub.City    = "gz";
            ub.Counrty = "cn";
            ub.Age     = 10;
            Contact contact = new Contact();

            contact.EMail = "*****@*****.**";
            contact.QQ    = "28304340";
            contact.Phone = "13660223497";
            map.Set(ub, contact);
            map.Remove <Contact>();
            contact = map.Get <Contact>();
            Assert.AreEqual(null, contact);
        }
Пример #2
0
        public void MapSetdRemove()
        {
            JsonMapSet map = "john_info";
            UserBase   ub  = new UserBase();

            ub.Name    = "john";
            ub.City    = "wx";
            ub.Country = "cn";
            ub.Age     = 10;
            Contract contract = new Contract();

            contract.Email = "*****@*****.**";
            contract.QQ    = "23423";
            contract.Phone = "2322342";
            map.Set(ub, contract);
            map.Remove <Contract>();

            contract = map.Get <Contract>();
            Assert.AreEqual(null, contract);
        }