예제 #1
0
        protected override byte[] BuildContent(StorageFileTable obj)
        {
            var formatter = new BinaryFormatter();

            using (var ms = new MemoryStream())
            {
                formatter.Serialize(ms, obj);
                return(ms.ToArray());
            }
        }
예제 #2
0
        protected override byte[] BuildContent(StorageFileTable obj)
        {
            var json = JsonUtility.ToJson(obj, true);

            return(System.Text.Encoding.UTF8.GetBytes(json));
        }