SerializerManager 类
管理序列化静态方法,主要是优化网络协议时使用。
继承成员
命名空间: Fantasy.Serialize
程序集: Fantasy.Net.dll
语法
public static class SerializerManager
方法
| 编辑本文 查看源代码Dispose()
销毁方法
声明
public static void Dispose()
GetSerializer(uint)
根据协议类型获取序列化器
声明
public static ISerialize GetSerializer(uint opCodeProtocolType)
参数
类型 | 名称 | 描述 |
---|---|---|
uint | opCodeProtocolType |
返回
类型 | 描述 |
---|---|
ISerialize |
Initialize()
初始化方法
声明
public static void Initialize()
TryGetSerializer(uint, out ISerialize)
获得一个序列化器
声明
public static bool TryGetSerializer(uint opCodeProtocolType, out ISerialize serializer)
参数
类型 | 名称 | 描述 |
---|---|---|
uint | opCodeProtocolType | |
ISerialize | serializer |
返回
类型 | 描述 |
---|---|
bool |