public void Write(Type serializerType, BinaryWriter bw, object value) { if (serializerType == typeof(StringSerializer)) { StringSerializer.WriteValue(bw, (string)value); return; } if (serializerType == typeof(NumberSerializer)) { NumberSerializer.Write(bw, value); return; } if (serializerType == typeof(EnumSerializer)) { EnumSerializer.Write(bw, value); return; } if (serializerType == typeof(GuidSerializer)) { GuidSerializer.Write(bw, value); return; } if (serializerType == typeof(BoolSerializer)) { BoolSerializer.Write(bw, value); return; } if (serializerType == typeof(DateTimeSerializer)) { DateTimeSerializer.Write(bw, value); return; } if (serializerType == typeof(TimeSpanSerializer)) { TimeSpanSerializer.Write(bw, value); return; } if (serializerType == typeof(SerializedObjectSerializer)) { SerializedObjectSerializer.Write(bw, value); return; } if (serializerType == typeof(ByteArraySerializer)) { ByteArraySerializer.Write(bw, value); return; } if (serializerType == typeof(CharSerializer)) { CharSerializer.Write(bw, value); return; } if (serializerType == typeof(DateTimeOffsetSerializer)) { DateTimeOffsetSerializer.Write(bw, value); } }