Beispiel #1
0
 public CustomType(Type type, byte bSign, BinSerializeFunc serializeFunc, BinDeserializeFunc deserializeFunc)
 {
     this.type               = type;
     this.bSign              = bSign;
     this.binSerializeFunc   = serializeFunc;
     this.binDeserializeFunc = deserializeFunc;
 }
Beispiel #2
0
 public static bool BinExtendCustomType(Type type, byte bSign, BinSerializeFunc serializeFunc, BinDeserializeFunc deserializeFunc)
 {
     if (!CheckNativeTypes(bSign))
     {
         return(false);
     }
     if (!BinBuffer.ExtendCustomType(type, bSign, serializeFunc))
     {
         return(false);
     }
     if (!BinParser.ExtendCustomType(type, bSign, deserializeFunc))
     {
         return(false);
     }
     return(true);
 }
Beispiel #3
0
 public static bool ExtendCustomType(Type type, byte bSign, BinSerializeFunc func)
 {
     customTypeExtends[type] = new CustomType(type, bSign, func, null);
     return(true);
 }