From 8e7b15285ec8a513d9c94d688f864e3203304bc3 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Fri, 3 Apr 2020 20:59:38 +0200 Subject: Clean up SqliteItemRepository --- Emby.Server.Implementations/Data/SqliteExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Emby.Server.Implementations/Data/SqliteExtensions.cs') diff --git a/Emby.Server.Implementations/Data/SqliteExtensions.cs b/Emby.Server.Implementations/Data/SqliteExtensions.cs index c87793072..e7c5270b9 100644 --- a/Emby.Server.Implementations/Data/SqliteExtensions.cs +++ b/Emby.Server.Implementations/Data/SqliteExtensions.cs @@ -287,7 +287,7 @@ namespace Emby.Server.Implementations.Data } } - public static void TryBind(this IStatement statement, string name, byte[] value) + public static void TryBind(this IStatement statement, string name, ReadOnlySpan value) { if (statement.BindParameters.TryGetValue(name, out IBindParameter bindParam)) { -- cgit v1.2.3 From 72219795d1c2751828d902031bdb428027a039c4 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Wed, 15 Apr 2020 14:29:12 +0200 Subject: Remove dead function --- .../Data/SqliteExtensions.cs | 27 +++------------------- 1 file changed, 3 insertions(+), 24 deletions(-) (limited to 'Emby.Server.Implementations/Data/SqliteExtensions.cs') diff --git a/Emby.Server.Implementations/Data/SqliteExtensions.cs b/Emby.Server.Implementations/Data/SqliteExtensions.cs index e7c5270b9..716e5071d 100644 --- a/Emby.Server.Implementations/Data/SqliteExtensions.cs +++ b/Emby.Server.Implementations/Data/SqliteExtensions.cs @@ -3,8 +3,6 @@ using System; using System.Collections.Generic; using System.Globalization; -using System.IO; -using MediaBrowser.Model.Serialization; using SQLitePCL.pretty; namespace Emby.Server.Implementations.Data @@ -109,25 +107,6 @@ namespace Emby.Server.Implementations.Data return null; } - /// - /// Serializes to bytes. - /// - /// System.Byte[][]. - /// obj - public static byte[] SerializeToBytes(this IJsonSerializer json, object obj) - { - if (obj == null) - { - throw new ArgumentNullException(nameof(obj)); - } - - using (var stream = new MemoryStream()) - { - json.SerializeToStream(obj, stream); - return stream.ToArray(); - } - } - public static void Attach(SQLiteDatabaseConnection db, string path, string alias) { var commandText = string.Format( @@ -383,11 +362,11 @@ namespace Emby.Server.Implementations.Data } } - public static IEnumerable> ExecuteQuery(this IStatement This) + public static IEnumerable> ExecuteQuery(this IStatement statement) { - while (This.MoveNext()) + while (statement.MoveNext()) { - yield return This.Current; + yield return statement.Current; } } } -- cgit v1.2.3