FastBinaryFormatterAddFastBinaryConverterTType, TConverter 方法
为指定类型添加快速二进制转换器。
命名空间: TouchSocket.Core程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
public static void AddFastBinaryConverter<TType, TConverter>()
where TConverter : new(), IFastBinaryConverter
Public Shared Sub AddFastBinaryConverter(Of TType, TConverter As {New, IFastBinaryConverter})
static member AddFastBinaryConverter : unit -> unit when 'TConverter : new() and IFastBinaryConverter
类型参数
- TType
- 要序列化的类型。
- TConverter
- 实现IFastBinaryConverter接口的转换器类型。
转换器必须有公共无参构造函数。注册后,该类型的所有实例都将使用指定的转换器进行序列化。