Beispiel #1
0
 /// <summary>
 /// [加密压缩]二进制反序化成具体实例对象
 /// </summary>
 /// <param name="array"></param>
 /// <returns></returns>
 public static object BinaryDeserialize(byte[] array)
 {
     return(BinarySerializer.DecompressDecryptToObject(array));
 }
Beispiel #2
0
 /// <summary>
 /// [加密压缩]将指定对象序列化成二进制数组,以便进行网络传输给客户端或服务端
 /// 如果处理失败或对象无效,则返回null
 /// </summary>
 /// <param name="o"></param>
 /// <returns></returns>
 public static byte[] BinarySerialize(object o)
 {
     return(BinarySerializer.CompressEncryptToBytes(o));
 }