コード例 #1
0
 /// <summary>
 /// XML反序列化为对象
 /// </summary>
 /// <param name="array"></param>
 /// <param name="type"></param>
 /// <returns></returns>
 public static object Deserialize(byte[] array, Type type)
 {
     return(XMLSerializer.DecompressDecryptToObject(array, type));
 }
コード例 #2
0
 /// <summary>
 /// XML序列化成字节
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public static byte[] Serialize(object obj)
 {
     return(XMLSerializer.CompressEncryptToBytes(obj));
 }