diff --git a/src/NPoco.Abstractions/IAsyncDatabase.cs b/src/NPoco.Abstractions/IAsyncDatabase.cs index 01962db1..ac4bf776 100644 --- a/src/NPoco.Abstractions/IAsyncDatabase.cs +++ b/src/NPoco.Abstractions/IAsyncDatabase.cs @@ -1,3 +1,4 @@ +#nullable enable using System; using System.Collections.Generic; using System.Data; @@ -46,12 +47,12 @@ public interface IAsyncDatabase : IAsyncQueryDatabase /// /// Insert POCO's into database using SqlBulkCopy for SqlServer (other DB's currently fall back to looping each row) /// - Task InsertBulkAsync(IEnumerable pocos, InsertBulkOptions options = null, CancellationToken cancellationToken = default); + Task InsertBulkAsync(IEnumerable pocos, InsertBulkOptions? options = null, CancellationToken cancellationToken = default); /// /// Insert POCO's into database by concatenating sql using the provided batch options /// - Task InsertBatchAsync(IEnumerable pocos, BatchOptions options = null, CancellationToken cancellationToken = default); + Task InsertBatchAsync(IEnumerable pocos, BatchOptions? options = null, CancellationToken cancellationToken = default); /// /// Update POCO in the table by convention or configuration @@ -71,7 +72,7 @@ public interface IAsyncDatabase : IAsyncQueryDatabase /// /// Update POCO's into database by concatenating sql using the provided batch options /// - Task UpdateBatchAsync(IEnumerable> pocos, BatchOptions options = null, CancellationToken cancellationToken = default); + Task UpdateBatchAsync(IEnumerable> pocos, BatchOptions? options = null, CancellationToken cancellationToken = default); /// /// Delete POCO from table by convention or configuration @@ -116,13 +117,13 @@ public interface IAsyncQueryDatabase : IAsyncBaseDatabase /// /// Fetch the only row of type T using the sql and parameters specified /// - Task SingleOrDefaultAsync(string sql, CancellationToken cancellationToken = default); - Task SingleOrDefaultAsync(string sql, object[] args, CancellationToken cancellationToken = default); + Task SingleOrDefaultAsync(string sql, CancellationToken cancellationToken = default); + Task SingleOrDefaultAsync(string sql, object[] args, CancellationToken cancellationToken = default); /// /// Fetch the only row of type T using the sql and parameters specified /// - Task SingleOrDefaultAsync(Sql sql, CancellationToken cancellationToken = default); + Task SingleOrDefaultAsync(Sql sql, CancellationToken cancellationToken = default); /// /// Get an object of type T by primary key value @@ -132,7 +133,7 @@ public interface IAsyncQueryDatabase : IAsyncBaseDatabase /// /// Get an object of type T by primary key value /// - Task SingleOrDefaultByIdAsync(object primaryKey, CancellationToken cancellationToken = default); + Task SingleOrDefaultByIdAsync(object primaryKey, CancellationToken cancellationToken = default); /// /// Fetch the first row of type T using the sql and parameters specified @@ -148,13 +149,13 @@ public interface IAsyncQueryDatabase : IAsyncBaseDatabase /// /// Fetch the first row of type T using the sql and parameters specified /// - Task FirstOrDefaultAsync(string sql, CancellationToken cancellationToken = default); - Task FirstOrDefaultAsync(string sql, object[] args, CancellationToken cancellationToken = default); + Task FirstOrDefaultAsync(string sql, CancellationToken cancellationToken = default); + Task FirstOrDefaultAsync(string sql, object[] args, CancellationToken cancellationToken = default); /// /// Fetch the first row of type T using the sql and parameters specified /// - Task FirstOrDefaultAsync(Sql sql, CancellationToken cancellationToken = default); + Task FirstOrDefaultAsync(Sql sql, CancellationToken cancellationToken = default); /// /// Fetch objects of type T from the database using the sql and parameters specified. diff --git a/src/NPoco.Abstractions/IDatabaseQuery.cs b/src/NPoco.Abstractions/IDatabaseQuery.cs index cd688402..3a780e52 100644 --- a/src/NPoco.Abstractions/IDatabaseQuery.cs +++ b/src/NPoco.Abstractions/IDatabaseQuery.cs @@ -1,3 +1,4 @@ +#nullable enable using System; using System.Collections; using System.Collections.Generic; @@ -186,17 +187,17 @@ public interface IDatabaseQuery : IAsyncQueryDatabase /// /// Get an object of type T by primary key value where the row may not be there /// - T SingleOrDefaultById(object primaryKey); + T? SingleOrDefaultById(object primaryKey); /// /// Fetch the only row of type T using the sql and parameters specified /// - T SingleOrDefault(string sql, params object[] args); + T? SingleOrDefault(string sql, params object[] args); /// /// Fetch the only row of type T using the sql and parameters specified into the T instance provided /// - T SingleOrDefaultInto(T instance, string sql, params object[] args); + T? SingleOrDefaultInto(T instance, string sql, params object[] args); /// /// Fetch the first row of type T using the sql and parameters specified @@ -211,12 +212,12 @@ public interface IDatabaseQuery : IAsyncQueryDatabase /// /// Fetch the first row of type T using the sql and parameters specified /// - T FirstOrDefault(string sql, params object[] args); + T? FirstOrDefault(string sql, params object[] args); /// /// Fetch the first row of type T using the sql and parameters specified into the T instance provided /// - T FirstOrDefaultInto(T instance, string sql, params object[] args); + T? FirstOrDefaultInto(T instance, string sql, params object[] args); /// /// Fetch the only row of type T using the Sql specified @@ -231,12 +232,12 @@ public interface IDatabaseQuery : IAsyncQueryDatabase /// /// Fetch the only row of type T using the Sql specified /// - T SingleOrDefault(Sql sql); + T? SingleOrDefault(Sql sql); /// /// Fetch the only row of type T using the Sql specified /// - T SingleOrDefaultInto(T instance, Sql sql); + T? SingleOrDefaultInto(T instance, Sql sql); /// /// Fetch the first row of type T using the Sql specified @@ -251,22 +252,22 @@ public interface IDatabaseQuery : IAsyncQueryDatabase /// /// Fetch the first row of type T using the Sql specified /// - T FirstOrDefault(Sql sql); + T? FirstOrDefault(Sql sql); /// /// Fetch the first row of type T using the Sql specified /// - T FirstOrDefaultInto(T instance, Sql sql); + T? FirstOrDefaultInto(T instance, Sql sql); /// /// Fetches the first two columns into a dictionary using the first value as the key and the second as the value /// - Dictionary Dictionary(Sql Sql); + Dictionary Dictionary(Sql sql) where TKey : notnull; /// /// Fetches the first two columns into a dictionary using the first value as the key and the second as the value /// - Dictionary Dictionary(string sql, params object[] args); + Dictionary Dictionary(string sql, params object[] args) where TKey : notnull; /// /// Checks if the POCO of type T exists by using the primary key value diff --git a/src/NPoco.Abstractions/Linq/IAsyncQueryProvider.cs b/src/NPoco.Abstractions/Linq/IAsyncQueryProvider.cs index c41ca3f4..a2783965 100644 --- a/src/NPoco.Abstractions/Linq/IAsyncQueryProvider.cs +++ b/src/NPoco.Abstractions/Linq/IAsyncQueryProvider.cs @@ -1,4 +1,5 @@ -using System; +#nullable enable +using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -14,12 +15,12 @@ public interface IAsyncQueryResultProvider Task> ToList(CancellationToken cancellationToken = default); Task ToArray(CancellationToken cancellationToken = default); IAsyncEnumerable ToEnumerable(CancellationToken cancellationToken = default); - Task FirstOrDefault(CancellationToken cancellationToken = default); - Task FirstOrDefault(Expression> whereExpression, CancellationToken cancellationToken = default); + Task FirstOrDefault(CancellationToken cancellationToken = default); + Task FirstOrDefault(Expression> whereExpression, CancellationToken cancellationToken = default); Task First(CancellationToken cancellationToken = default); Task First(Expression> whereExpression, CancellationToken cancellationToken = default); - Task SingleOrDefault(CancellationToken cancellationToken = default); - Task SingleOrDefault(Expression> whereExpression, CancellationToken cancellationToken = default); + Task SingleOrDefault(CancellationToken cancellationToken = default); + Task SingleOrDefault(Expression> whereExpression, CancellationToken cancellationToken = default); Task Single(CancellationToken cancellationToken = default); Task Single(Expression> whereExpression, CancellationToken cancellationToken = default); Task Count(CancellationToken cancellationToken = default); @@ -34,12 +35,12 @@ public interface IAsyncQueryResultProvider public interface IQueryResultProvider { - T FirstOrDefault(); - T FirstOrDefault(Expression> whereExpression); + T? FirstOrDefault(); + T? FirstOrDefault(Expression> whereExpression); T First(); T First(Expression> whereExpression); - T SingleOrDefault(); - T SingleOrDefault(Expression> whereExpression); + T? SingleOrDefault(); + T? SingleOrDefault(Expression> whereExpression); T Single(); T Single(Expression> whereExpression); int Count(); @@ -58,12 +59,12 @@ public interface IQueryResultProvider Task> ToListAsync(CancellationToken cancellationToken = default); Task ToArrayAsync(CancellationToken cancellationToken = default); IAsyncEnumerable ToEnumerableAsync(CancellationToken cancellationToken = default); - Task FirstOrDefaultAsync(CancellationToken cancellationToken = default); - Task FirstOrDefaultAsync(Expression> whereExpression, CancellationToken cancellationToken = default); + Task FirstOrDefaultAsync(CancellationToken cancellationToken = default); + Task FirstOrDefaultAsync(Expression> whereExpression, CancellationToken cancellationToken = default); Task FirstAsync(CancellationToken cancellationToken = default); Task FirstAsync(Expression> whereExpression, CancellationToken cancellationToken = default); - Task SingleOrDefaultAsync(CancellationToken cancellationToken = default); - Task SingleOrDefaultAsync(Expression> whereExpression, CancellationToken cancellationToken = default); + Task SingleOrDefaultAsync(CancellationToken cancellationToken = default); + Task SingleOrDefaultAsync(Expression> whereExpression, CancellationToken cancellationToken = default); Task SingleAsync(CancellationToken cancellationToken = default); Task SingleAsync(Expression> whereExpression, CancellationToken cancellationToken = default); Task CountAsync(CancellationToken cancellationToken = default); diff --git a/src/NPoco.Abstractions/NPoco.Abstractions.csproj b/src/NPoco.Abstractions/NPoco.Abstractions.csproj index 763b3099..5b6ba56d 100644 --- a/src/NPoco.Abstractions/NPoco.Abstractions.csproj +++ b/src/NPoco.Abstractions/NPoco.Abstractions.csproj @@ -1,7 +1,7 @@  - net461;netstandard2.0;netstandard2.1 + net461;netstandard2.0;netstandard2.1;net8.0 disable latest $(MSBuildProjectName.Replace(" ", "_").Replace(".Abstractions", "")) diff --git a/src/NPoco.JsonNet/NPoco.JsonNet.csproj b/src/NPoco.JsonNet/NPoco.JsonNet.csproj index e45e760b..916d3498 100644 --- a/src/NPoco.JsonNet/NPoco.JsonNet.csproj +++ b/src/NPoco.JsonNet/NPoco.JsonNet.csproj @@ -3,7 +3,7 @@ Provides an implementation to use Json.NET as the serializer for serialized columns 5.7.0 - net461;netstandard2.0;netstandard2.1 + net461;netstandard2.0;netstandard2.1;net8.0 NPoco.JsonNet NPoco.JsonNet orm;sql;micro-orm;database;mvc @@ -22,7 +22,7 @@ - + diff --git a/src/NPoco.SqlServer.SystemData/NPoco.SqlServer.SystemData.csproj b/src/NPoco.SqlServer.SystemData/NPoco.SqlServer.SystemData.csproj index 0bc9b5ff..c0b40ac5 100644 --- a/src/NPoco.SqlServer.SystemData/NPoco.SqlServer.SystemData.csproj +++ b/src/NPoco.SqlServer.SystemData/NPoco.SqlServer.SystemData.csproj @@ -3,7 +3,7 @@ An extremely easy to use Micro-ORM supporting Sql Server. 5.7.0 - net461;netstandard2.0;netstandard2.1 + net461;netstandard2.0;netstandard2.1;net8.0 NPoco.SqlServer.SystemData NPoco.SqlServer.SystemData Adam Schröder diff --git a/src/NPoco.SqlServer/NPoco.SqlServer.csproj b/src/NPoco.SqlServer/NPoco.SqlServer.csproj index 70f14527..69183863 100644 --- a/src/NPoco.SqlServer/NPoco.SqlServer.csproj +++ b/src/NPoco.SqlServer/NPoco.SqlServer.csproj @@ -3,7 +3,7 @@ An extremely easy to use Micro-ORM supporting Sql Server. 5.7.0 - net461;netstandard2.0;netstandard2.1 + net461;netstandard2.0;netstandard2.1;net8.0 NPoco.SqlServer NPoco.SqlServer Adam Schröder diff --git a/src/NPoco/Database.cs b/src/NPoco/Database.cs index 6acf1e6b..2d2018b4 100644 --- a/src/NPoco/Database.cs +++ b/src/NPoco/Database.cs @@ -888,7 +888,7 @@ public T ExecuteScalar(string sql, CommandType commandType, params object[] a return default!; Type t = typeof(T); - Type u = Nullable.GetUnderlyingType(t); + Type? u = Nullable.GetUnderlyingType(t); return (T)Convert.ChangeType(val, u ?? t); } @@ -964,12 +964,12 @@ public List SkipTake(long skip, long take, Sql sql) return SkipTake(skip, take, sql.SQL, sql.Arguments); } - public Dictionary Dictionary(Sql Sql) + public Dictionary Dictionary(Sql Sql) where TKey : notnull { return Dictionary(Sql.SQL, Sql.Arguments); } - public Dictionary Dictionary(string sql, params object[] args) + public Dictionary Dictionary(string sql, params object[] args) where TKey : notnull { var newDict = new Dictionary(); bool isConverterSet = false; @@ -1364,7 +1364,9 @@ private async Task FetchMultipleImp(Type[] types, ob try { - OpenSharedConnectionInternal(); + if (sync) OpenSharedConnectionInternal(); + else await OpenSharedConnectionInternalAsync(cancellationToken); + using var cmd = CreateCommand(_sharedConnection, sql, args); using var r = sync ? ExecuteDataReader(cmd, true).RunSync() : await ExecuteDataReader(cmd, false, cancellationToken).ConfigureAwait(false); @@ -1428,7 +1430,8 @@ private async Task FetchMultipleImp(Type[] types, ob } finally { - CloseSharedConnectionInternal(); + if (sync) CloseSharedConnectionInternal(); + else await CloseSharedConnectionInternalAsync(); } } @@ -1443,7 +1446,7 @@ public T SingleById(object primaryKey) return Single(sql); } - public T SingleOrDefaultById(object primaryKey) + public T? SingleOrDefaultById(object primaryKey) { var sql = GenerateSingleByIdSql(primaryKey); return SingleOrDefault(sql); @@ -1467,11 +1470,11 @@ public T SingleInto(T instance, string sql, params object[] args) { return Query(instance, new Sql(sql, args)).Single(); } - public T SingleOrDefault(string sql, params object[] args) + public T? SingleOrDefault(string sql, params object[] args) { return Query(sql, args).SingleOrDefault(); } - public T SingleOrDefaultInto(T instance, string sql, params object[] args) + public T? SingleOrDefaultInto(T instance, string sql, params object[] args) { return Query(instance, new Sql(sql, args)).SingleOrDefault(); } @@ -1483,11 +1486,11 @@ public T FirstInto(T instance, string sql, params object[] args) { return Query(instance, new Sql(sql, args)).First(); } - public T FirstOrDefault(string sql, params object[] args) + public T? FirstOrDefault(string sql, params object[] args) { return Query(sql, args).FirstOrDefault(); } - public T FirstOrDefaultInto(T instance, string sql, params object[] args) + public T? FirstOrDefaultInto(T instance, string sql, params object[] args) { return Query(instance, new Sql(sql, args)).FirstOrDefault(); } @@ -1499,11 +1502,11 @@ public T SingleInto(T instance, Sql sql) { return Query(instance, sql).Single(); } - public T SingleOrDefault(Sql sql) + public T? SingleOrDefault(Sql sql) { return Query(sql).SingleOrDefault(); } - public T SingleOrDefaultInto(T instance, Sql sql) + public T? SingleOrDefaultInto(T instance, Sql sql) { return Query(instance, sql).SingleOrDefault(); } @@ -1515,11 +1518,11 @@ public T FirstInto(T instance, Sql sql) { return Query(instance, sql).First(); } - public T FirstOrDefault(Sql sql) + public T? FirstOrDefault(Sql sql) { return Query(sql).FirstOrDefault(); } - public T FirstOrDefaultInto(T instance, Sql sql) + public T? FirstOrDefaultInto(T instance, Sql sql) { return Query(instance, sql).FirstOrDefault(); } @@ -1581,7 +1584,7 @@ public virtual int Update(string tableName, string primaryKeyName, object poco, public int UpdateBatch(IEnumerable> pocos, BatchOptions? options = null) { - return UpdateBatchAsyncImp(pocos, options, true).RunSync(); + return UpdateBatchAsyncImp(pocos, options, true).RunSync(); } // Update a record with values from a poco. primary key value can be either supplied or read from the poco @@ -1611,7 +1614,7 @@ private async Task UpdateImpAsync(string tableName, string primaryKeyName, // Set Version if (!string.IsNullOrEmpty(preparedStatement.VersionName) && preparedStatement.VersionColumnType == VersionColumnType.Number) { - PocoColumn pc; + PocoColumn? pc; if (preparedStatement.PocoData.Columns.TryGetValue(preparedStatement.VersionName, out pc)) { pc.SetValue(poco, Convert.ChangeType(Convert.ToInt64(preparedStatement.VersionValue) + 1, pc.MemberInfoData.MemberType)); @@ -1642,7 +1645,7 @@ internal static Dictionary GetPrimaryKeyValues(Database database else { var dict = primaryKeyValueOrPoco as Dictionary; - primaryKeyValues = dict ?? multiplePrimaryKeysNames.ToDictionary(x => x, x => primaryKeyValueOrPoco.GetType().GetProperties().Single(y => string.Equals(x, y.Name, StringComparison.OrdinalIgnoreCase)).GetValue(primaryKeyValueOrPoco, null), StringComparer.OrdinalIgnoreCase); + primaryKeyValues = dict ?? multiplePrimaryKeysNames.ToDictionary(x => x, x => primaryKeyValueOrPoco.GetType().GetProperties().Single(y => string.Equals(x, y.Name, StringComparison.OrdinalIgnoreCase)).GetValue(primaryKeyValueOrPoco, null)!, StringComparer.OrdinalIgnoreCase); } } else @@ -1820,7 +1823,7 @@ private async Task IsNewAsync(T poco, bool sync, CancellationToken canc var pd = PocoDataFactory.ForType(poco.GetType()); object pk; - PocoColumn pc; + PocoColumn? pc; if (pd.Columns.TryGetValue(pd.TableInfo.PrimaryKey, out pc)) { @@ -1836,7 +1839,7 @@ private async Task IsNewAsync(T poco, bool sync, CancellationToken canc { var pi = poco.GetType().GetProperty(pd.TableInfo.PrimaryKey); if (pi == null) throw new ArgumentException(string.Format("The object doesn't have a property matching the primary key column name '{0}'", pd.TableInfo.PrimaryKey)); - pk = pi.GetValue(poco, null); + pk = pi.GetValue(poco, null)!; } if (pk == null) @@ -1965,7 +1968,7 @@ internal object ExecuteScalarHelper(DbCommand cmd) DoPreExecute(cmd); var result = ExecutionHook(() => cmd.ExecuteScalar()); OnExecutedCommandInternal(cmd); - return result; + return result!; } internal DbDataReader ExecuteReaderHelper(DbCommand cmd) @@ -1973,7 +1976,7 @@ internal DbDataReader ExecuteReaderHelper(DbCommand cmd) DoPreExecute(cmd); var result = ExecutionHook(() => cmd.ExecuteReader()); OnExecutedCommandInternal(cmd); - return result; + return result!; } protected virtual T ExecutionHook(Func action) diff --git a/src/NPoco/FastJsonColumnSerializer.cs b/src/NPoco/FastJsonColumnSerializer.cs index 43e7cc61..998b4b9f 100644 --- a/src/NPoco/FastJsonColumnSerializer.cs +++ b/src/NPoco/FastJsonColumnSerializer.cs @@ -19,7 +19,7 @@ public string Serialize(object value) public object Deserialize(string value, Type targetType) { - var deserializer = new fastJSON.deserializer(JSONParameters); + var deserializer = new fastJSON.Deserializer(JSONParameters); return deserializer.ToObject(value, targetType); } } diff --git a/src/NPoco/Internal/ProcessMapperExtensions.cs b/src/NPoco/Internal/ProcessMapperExtensions.cs index 477eb4a0..65af3631 100644 --- a/src/NPoco/Internal/ProcessMapperExtensions.cs +++ b/src/NPoco/Internal/ProcessMapperExtensions.cs @@ -28,7 +28,7 @@ public static object ProcessDefaultMappings(IDatabase database, PocoColumn pocoC } if (pocoColumn.ColumnType == typeof(string) && Database.IsEnum(pocoColumn.MemberInfoData) && value != null) { - return value.ToString(); + return value.ToString()!; } return database.DatabaseType.ProcessDefaultMappings(pocoColumn, value); diff --git a/src/NPoco/NPoco.csproj b/src/NPoco/NPoco.csproj index 42471fa6..21af105b 100644 --- a/src/NPoco/NPoco.csproj +++ b/src/NPoco/NPoco.csproj @@ -2,7 +2,7 @@ An extremely easy to use Micro-ORM supporting Sql Server, MySQL, PostgreSQL, Oracle, Sqlite, SqlCE. - net461;netstandard2.0;netstandard2.1 + net461;netstandard2.0;netstandard2.1;net8.0 NPoco NPoco 5.7.0 diff --git a/src/NPoco/fastJSON/JSON.cs b/src/NPoco/fastJSON/JSON.cs index a6c30e20..dddef3d3 100644 --- a/src/NPoco/fastJSON/JSON.cs +++ b/src/NPoco/fastJSON/JSON.cs @@ -238,7 +238,7 @@ public static dynamic ToDynamic(string json) /// public static T ToObject(string json) { - return new deserializer(Parameters).ToObject(json); + return new Deserializer(Parameters).ToObject(json); } /// /// Create a typed generic object from the json with parameter override on this call @@ -249,7 +249,7 @@ public static T ToObject(string json) /// public static T ToObject(string json, JSONParameters param) { - return new deserializer(param).ToObject(json); + return new Deserializer(param).ToObject(json); } /// /// Create an object from the json @@ -258,7 +258,7 @@ public static T ToObject(string json, JSONParameters param) /// public static object ToObject(string json) { - return new deserializer(Parameters).ToObject(json, null); + return new Deserializer(Parameters).ToObject(json, null); } /// /// Create an object from the json with parameter override on this call @@ -268,7 +268,7 @@ public static object ToObject(string json) /// public static object ToObject(string json, JSONParameters param) { - return new deserializer(param).ToObject(json, null); + return new Deserializer(param).ToObject(json, null); } /// /// Create an object of type from the json @@ -278,7 +278,7 @@ public static object ToObject(string json, JSONParameters param) /// public static object ToObject(string json, Type type) { - return new deserializer(Parameters).ToObject(json, type); + return new Deserializer(Parameters).ToObject(json, type); } /// /// Create an object of type from the json with parameter override on this call @@ -289,7 +289,7 @@ public static object ToObject(string json, Type type) /// public static object ToObject(string json, Type type, JSONParameters par) { - return new deserializer(par).ToObject(json, type); + return new Deserializer(par).ToObject(json, type); } /// /// Fill a given object with the json represenation @@ -301,7 +301,7 @@ public static object FillObject(object input, string json) { Dictionary ht = new JsonParser(json, Parameters.AllowNonQuotedKeys).Decode() as Dictionary; if (ht == null) return null; - return new deserializer(Parameters).ParseDictionary(ht, null, input.GetType(), input); + return new Deserializer(Parameters).ParseDictionary(ht, null, input.GetType(), input); } /// /// Deep copy an object i.e. clone to a new object @@ -310,7 +310,7 @@ public static object FillObject(object input, string json) /// public static object DeepCopy(object obj) { - return new deserializer(Parameters).ToObject(ToJSON(obj)); + return new Deserializer(Parameters).ToObject(ToJSON(obj)); } /// /// @@ -320,7 +320,7 @@ public static object DeepCopy(object obj) /// public static T DeepCopy(T obj) { - return new deserializer(Parameters).ToObject(ToJSON(obj)); + return new Deserializer(Parameters).ToObject(ToJSON(obj)); } /// @@ -386,9 +386,9 @@ internal static long CreateLong(string s, int index, int count) } } - internal class deserializer + internal class Deserializer { - public deserializer(JSONParameters param) + public Deserializer(JSONParameters param) { param.FixValues(); _params = param.MakeCopy(); @@ -776,7 +776,13 @@ internal object ParseDictionary(Dictionary d, Dictionary NPoco Tests 5.0.0 - net6.0 + net8.0 NPoco.Tests Library NPoco.Tests @@ -23,11 +23,11 @@ - + - - - + + +