From 93a06bb22cca60d028caccc577bfabdd2c5c8e69 Mon Sep 17 00:00:00 2001 From: Joyless <65855333+Joy-less@users.noreply.github.com> Date: Mon, 2 Dec 2024 23:18:39 +0000 Subject: [PATCH] Minor formatting improvements --- SQLiteSharp/Orm.cs | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/SQLiteSharp/Orm.cs b/SQLiteSharp/Orm.cs index ad68643..09de455 100644 --- a/SQLiteSharp/Orm.cs +++ b/SQLiteSharp/Orm.cs @@ -119,107 +119,107 @@ public static Type AsUnderlyingType(Type Type) { private void AddDefaultTypeSerializers() { RegisterType( - sqliteType: SqliteType.Integer, + SqliteType.Integer, serialize: (bool clr) => clr ? 1 : 0, deserialize: (SqliteValue sqlite, Type clrType) => (int)sqlite.AsInteger != 0 ); RegisterType( - sqliteType: SqliteType.Text, + SqliteType.Text, serialize: (string clr) => clr, deserialize: (SqliteValue sqlite, Type clrType) => sqlite.AsText ); RegisterType( - sqliteType: SqliteType.Integer, + SqliteType.Integer, serialize: (byte clr) => clr, deserialize: (SqliteValue sqlite, Type clrType) => (byte)sqlite.AsInteger ); RegisterType( - sqliteType: SqliteType.Integer, + SqliteType.Integer, serialize: (sbyte clr) => clr, deserialize: (SqliteValue sqlite, Type clrType) => (sbyte)sqlite.AsInteger ); RegisterType( - sqliteType: SqliteType.Integer, + SqliteType.Integer, serialize: (short clr) => clr, deserialize: (SqliteValue sqlite, Type clrType) => (short)sqlite.AsInteger ); RegisterType( - sqliteType: SqliteType.Integer, + SqliteType.Integer, serialize: (ushort clr) => clr, deserialize: (SqliteValue sqlite, Type clrType) => (ushort)sqlite.AsInteger ); RegisterType( - sqliteType: SqliteType.Integer, + SqliteType.Integer, serialize: (int clr) => clr, deserialize: (SqliteValue sqlite, Type clrType) => (int)sqlite.AsInteger ); RegisterType( - sqliteType: SqliteType.Integer, + SqliteType.Integer, serialize: (uint clr) => clr, deserialize: (SqliteValue sqlite, Type clrType) => (uint)sqlite.AsInteger ); RegisterType( - sqliteType: SqliteType.Integer, + SqliteType.Integer, serialize: (long clr) => clr, deserialize: (SqliteValue sqlite, Type clrType) => sqlite.AsInteger ); RegisterType( - sqliteType: SqliteType.Integer, + SqliteType.Integer, serialize: (ulong clr) => clr, deserialize: (SqliteValue sqlite, Type clrType) => (ulong)sqlite.AsInteger ); RegisterType( - sqliteType: SqliteType.Integer, + SqliteType.Integer, serialize: (char clr) => clr, deserialize: (SqliteValue sqlite, Type clrType) => sqlite.AsInteger ); RegisterType( - sqliteType: SqliteType.Integer, + SqliteType.Integer, serialize: (float clr) => clr, deserialize: (SqliteValue sqlite, Type clrType) => (float)sqlite.AsFloat ); RegisterType( - sqliteType: SqliteType.Integer, + SqliteType.Integer, serialize: (double clr) => clr, deserialize: (SqliteValue sqlite, Type clrType) => sqlite.AsFloat ); RegisterType( - sqliteType: SqliteType.Integer, + SqliteType.Integer, serialize: (TimeSpan clr) => clr.Ticks, deserialize: (SqliteValue sqlite, Type clrType) => new TimeSpan(sqlite.AsInteger) ); RegisterType( - sqliteType: SqliteType.Integer, + SqliteType.Integer, serialize: (DateTime clr) => clr.Ticks, deserialize: (SqliteValue sqlite, Type clrType) => new DateTime(sqlite.AsInteger) ); RegisterType( - sqliteType: SqliteType.Text, + SqliteType.Text, serialize: (Uri clr) => clr.AbsoluteUri, deserialize: (SqliteValue sqlite, Type clrType) => new Uri(sqlite.AsText) ); RegisterType( - sqliteType: SqliteType.Blob, + SqliteType.Blob, serialize: (byte[] clr) => clr, deserialize: (SqliteValue sqlite, Type clrType) => sqlite.AsBlob ); RegisterType>( - sqliteType: SqliteType.Blob, + SqliteType.Blob, serialize: (IEnumerable clr) => clr.ToArray(), deserialize: (SqliteValue sqlite, Type clrType) => sqlite.AsBlob.ToList() ); RegisterType( - sqliteType: SqliteType.Integer, + SqliteType.Integer, serialize: (Enum clr) => Convert.ToInt64(clr), deserialize: (SqliteValue sqlite, Type clrType) => Enum.ToObject(clrType, sqlite.AsInteger) ); RegisterType( - sqliteType: SqliteType.Text, + SqliteType.Text, serialize: (StringBuilder clr) => clr.ToString(), deserialize: (SqliteValue sqlite, Type clrType) => sqlite.AsText ); RegisterType( - sqliteType: SqliteType.Text, + SqliteType.Text, serialize: (Guid clr) => clr.ToString(), deserialize: (SqliteValue sqlite, Type clrType) => sqlite.AsText );