public override void SetTypeMetadata(BinaryTypeInfo typeInfo, TypeMap typeMap, BinarySerializerOptions options)
        {
            base.SetTypeMetadata(typeInfo, typeMap, options);
            Type t = typeof(T).GetGenericTypeDefinition();

            typeInfo.Type     = TypeEnum.Tuple;
            typeInfo.FullName = null;
        }
Esempio n. 2
0
 public override void SetTypeMetadata(BinaryTypeInfo typeInfo, TypeMap typeMap, BinarySerializerOptions options)
 {
     typeInfo.SerializeType = ClassType.Object;
     if (typeof(T) == typeof(object))
     {
         typeInfo.Type = TypeEnum.Object;
     }
     else
     {
         typeInfo.FullName = options.GetTypeFullName(typeof(T));
         typeInfo.Type     = TypeEnum.Class;
     }
 }
 public override void SetTypeMetadata(BinaryTypeInfo typeInfo, TypeMap typeMap, BinarySerializerOptions options)
 {
     typeInfo.Type          = TypeEnum.DateTime;
     typeInfo.SerializeType = ClassType.Value;
 }
Esempio n. 4
0
 public override void SetTypeMetadata(BinaryTypeInfo typeInfo, TypeMap typeMap, BinarySerializerOptions options)
 {
     typeInfo.Type          = TypeEnum.Matrix3x2;
     typeInfo.SerializeType = ClassType.Object;
 }
 public override void SetTypeMetadata(BinaryTypeInfo typeInfo, TypeMap typeMap, BinarySerializerOptions options)
 {
 }
 public override void SetTypeMetadata(BinaryTypeInfo typeInfo, TypeMap typeMap, BinarySerializerOptions options)
 {
     base.SetTypeMetadata(typeInfo, typeMap, options);
     typeInfo.Type     = TypeEnum.TransitionTime;
     typeInfo.FullName = null;
 }
 public override void SetTypeMetadata(BinaryTypeInfo typeInfo, TypeMap typeMap, BinarySerializerOptions options)
 {
     typeInfo.SerializeType = ClassType.Enumerable;
     typeInfo.Type          = TypeEnum.Class;
     typeInfo.FullName      = options.GetTypeFullName(typeof(TCollection));
 }
 /// <summary>
 /// 设置类型的元数据
 /// </summary>
 /// <param name="typeInfo">类型元数据</param>
 /// <param name="typeMap">当前序列化的TypeMap</param>
 /// <returns></returns>
 public abstract void SetTypeMetadata(BinaryTypeInfo typeInfo, TypeMap typeMap, BinarySerializerOptions options);
 public override void SetTypeMetadata(BinaryTypeInfo typeInfo, TypeMap typeMap, BinarySerializerOptions options)
 {
     typeInfo.Type = TypeEnum.Nullable;
 }