예제 #1
0
        public byte[] Serialize(List <Clothes> list)
        {
            var service = new SerializeService();
            var objList = new List <object>();

            foreach (var item in list)
            {
                objList.Add(item);
            }
            return(service.Serialize(objList));
        }
예제 #2
0
        public List <Clothes> Deserialize(byte[] source)
        {
            var service     = new SerializeService();
            var objList     = service.Deserialize(source);
            var clothesList = new List <Clothes>();

            foreach (var item in objList)
            {
                clothesList.Add(item as Clothes);
            }
            return(clothesList);
        }