aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Data
diff options
context:
space:
mode:
authorcvium <clausvium@gmail.com>2021-05-19 19:33:24 +0200
committercvium <clausvium@gmail.com>2021-05-19 19:33:24 +0200
commit7e6a45c402988cba27c36cc6b1b339a4a52b732a (patch)
treeab67dc431a90fb06b2dd877213a5d83911bc63c1 /Emby.Server.Implementations/Data
parent1027792b16996e3fe7e4835805204e8c91beda01 (diff)
Review changes
Diffstat (limited to 'Emby.Server.Implementations/Data')
-rw-r--r--Emby.Server.Implementations/Data/SqliteExtensions.cs19
1 files changed, 10 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteExtensions.cs b/Emby.Server.Implementations/Data/SqliteExtensions.cs
index 3499713e1..a8f3feb58 100644
--- a/Emby.Server.Implementations/Data/SqliteExtensions.cs
+++ b/Emby.Server.Implementations/Data/SqliteExtensions.cs
@@ -97,12 +97,12 @@ namespace Emby.Server.Implementations.Data
DateTimeStyles.None).ToUniversalTime();
}
- public static bool TryReadDateTime(this IReadOnlyList<IResultSetValue> reader, int index, [NotNullWhen(true)] out DateTime? result)
+ public static bool TryReadDateTime(this IReadOnlyList<IResultSetValue> reader, int index, out DateTime result)
{
- result = null;
var item = reader[index];
if (item.IsDbNull())
{
+ result = default;
return false;
}
@@ -114,15 +114,16 @@ namespace Emby.Server.Implementations.Data
return true;
}
+ result = default;
return false;
}
- public static bool TryGetGuid(this IReadOnlyList<IResultSetValue> reader, int index, [NotNullWhen(true)] out Guid? result)
+ public static bool TryGetGuid(this IReadOnlyList<IResultSetValue> reader, int index, out Guid result)
{
- result = null;
var item = reader[index];
if (item.IsDbNull())
{
+ result = default;
return false;
}
@@ -158,7 +159,7 @@ namespace Emby.Server.Implementations.Data
return result[index].ToBool();
}
- public static bool TryGetBoolean(this IReadOnlyList<IResultSetValue> reader, int index, [NotNullWhen(true)] out bool result)
+ public static bool TryGetBoolean(this IReadOnlyList<IResultSetValue> reader, int index, out bool result)
{
var item = reader[index];
if (item.IsDbNull())
@@ -171,7 +172,7 @@ namespace Emby.Server.Implementations.Data
return true;
}
- public static bool TryGetInt32(this IReadOnlyList<IResultSetValue> reader, int index, [NotNullWhen(true)] out int result)
+ public static bool TryGetInt32(this IReadOnlyList<IResultSetValue> reader, int index, out int result)
{
var item = reader[index];
if (item.IsDbNull())
@@ -189,7 +190,7 @@ namespace Emby.Server.Implementations.Data
return result[index].ToInt64();
}
- public static bool TryGetInt64(this IReadOnlyList<IResultSetValue> reader, int index, [NotNullWhen(true)] out long result)
+ public static bool TryGetInt64(this IReadOnlyList<IResultSetValue> reader, int index, out long result)
{
var item = reader[index];
if (item.IsDbNull())
@@ -202,7 +203,7 @@ namespace Emby.Server.Implementations.Data
return true;
}
- public static bool TryGetSingle(this IReadOnlyList<IResultSetValue> reader, int index, [NotNullWhen(true)] out float result)
+ public static bool TryGetSingle(this IReadOnlyList<IResultSetValue> reader, int index, out float result)
{
var item = reader[index];
if (item.IsDbNull())
@@ -215,7 +216,7 @@ namespace Emby.Server.Implementations.Data
return true;
}
- public static bool TryGetDouble(this IReadOnlyList<IResultSetValue> reader, int index, [NotNullWhen(true)] out double result)
+ public static bool TryGetDouble(this IReadOnlyList<IResultSetValue> reader, int index, out double result)
{
var item = reader[index];
if (item.IsDbNull())