public CustomType(Type type, byte typeCode, SerializationFunc serializationFunc, DeserializationFunc deserializationFunc) { this.Type = type; this.TypeCode = typeCode; this.SerializationFunc = serializationFunc; this.DeserializationFunc = deserializationFunc; }
public static void RegisterCustomType(Type type, byte typeCode, SerializationFunc serializationFunc, DeserializationFunc deserializationFunc) { if (typeDict.ContainsKey(type)) { return; } var customClass = new CustomClass(type, typeCode, serializationFunc, deserializationFunc); typeDict.Add(type, customClass); typeCodeDict.Add(typeCode, customClass); }
public FuncFormatter(GetSizeFunc <T> getSizeFunc, SerializationFunc <T> serializationFunc, DeserializationFunc <T> deserializationFunc) { _getSizeFunc = getSizeFunc; _serializationFunc = serializationFunc; _deserializationFunc = deserializationFunc; }