Play-SDK-CSharp
Static Public Member Functions | List of all members
LeanCloud.Play.CodecUtils Class Reference

序列化工具类 More...

Static Public Member Functions

static bool RegisterType (Type type, int typeId, SerializeMethod serializeMethod, DeserializeMethod deserializeMethod)
 注册自定义类型的序列化 More...
 
static GenericCollectionValue Serialize (object val)
 序列化 More...
 
static object Deserialize (GenericCollectionValue genericValue)
 反序列化 More...
 
static byte[] SerializePlayObject (PlayObject playObject)
 序列化 PlayObject 对象 More...
 
static PlayObject DeserializePlayObject (byte[] bytes)
 反序列化 PlayObject 对象 More...
 
static PlayObject DeserializePlayObject (ByteString byteString)
 反序列化 PlayObject 对象 More...
 

Detailed Description

序列化工具类

Member Function Documentation

◆ Deserialize()

static object LeanCloud.Play.CodecUtils.Deserialize ( GenericCollectionValue  genericValue)
inlinestatic

反序列化

Returns
The decode.
Parameters
genericValue带类型的序列化对象

◆ DeserializePlayObject() [1/2]

static PlayObject LeanCloud.Play.CodecUtils.DeserializePlayObject ( byte[]  bytes)
inlinestatic

反序列化 PlayObject 对象

Returns
PlayObject 对象
Parameters
bytes要反序列化的字节码

◆ DeserializePlayObject() [2/2]

static PlayObject LeanCloud.Play.CodecUtils.DeserializePlayObject ( ByteString  byteString)
inlinestatic

反序列化 PlayObject 对象

Parameters
byteString要反序列化的字符串
Returns
PlayObject 对象

◆ RegisterType()

static bool LeanCloud.Play.CodecUtils.RegisterType ( Type  type,
int  typeId,
SerializeMethod  serializeMethod,
DeserializeMethod  deserializeMethod 
)
inlinestatic

注册自定义类型的序列化

Returns
true, if type was registered, false otherwise.
Parameters
type类型
typeId类型 Id
serializeMethod序列化方法
deserializeMethod反序列化方法

◆ Serialize()

static GenericCollectionValue LeanCloud.Play.CodecUtils.Serialize ( object  val)
inlinestatic

序列化

Returns
The encode.
Parameters
val要序列化的对象

◆ SerializePlayObject()

static byte [] LeanCloud.Play.CodecUtils.SerializePlayObject ( PlayObject  playObject)
inlinestatic

序列化 PlayObject 对象

Returns
The play object.
Parameters
playObjectPlayObject 对象

The documentation for this class was generated from the following file: