Various small fixes, setting guild config now works

This commit is contained in:
Ske
2020-06-13 19:15:50 +02:00
parent 2038f023a0
commit c875c8af9f
9 changed files with 56 additions and 70 deletions

View File

@@ -20,31 +20,4 @@ namespace PluralKit.Core
Interlocked.Decrement(ref _connectionCount);
}
}
public class PassthroughTypeHandler<T>: SqlMapper.TypeHandler<T>
{
public override void SetValue(IDbDataParameter parameter, T value)
{
parameter.Value = value;
}
public override T Parse(object value)
{
return (T) value;
}
}
public class UlongEncodeAsLongHandler: SqlMapper.TypeHandler<ulong>
{
public override ulong Parse(object value)
{
// Cast to long to unbox, then to ulong (???)
return (ulong) (long) value;
}
public override void SetValue(IDbDataParameter parameter, ulong value)
{
parameter.Value = (long) value;
}
}
}