aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Data/SqliteExtensions.cs
diff options
context:
space:
mode:
authorPatrick Barron <18354464+barronpm@users.noreply.github.com>2020-04-22 13:44:20 +0000
committerGitHub <noreply@github.com>2020-04-22 13:44:20 +0000
commit7586c6022428fd4e1296653a5c281d83b64c7f8e (patch)
tree539c9ca4b74a8027d0e636f7a86c587bd74b05a3 /Emby.Server.Implementations/Data/SqliteExtensions.cs
parentf26f44acaf86bb35ff1d2be7cb37a57dee7a47cf (diff)
parenta85b1dcba663fe3bbb2441380cd8da382c92f2bd (diff)
Merge branch 'master' into warnings-cleanup1
Diffstat (limited to 'Emby.Server.Implementations/Data/SqliteExtensions.cs')
-rw-r--r--Emby.Server.Implementations/Data/SqliteExtensions.cs27
1 files changed, 3 insertions, 24 deletions
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;
}
- /// <summary>
- /// Serializes to bytes.
- /// </summary>
- /// <returns>System.Byte[][].</returns>
- /// <exception cref="ArgumentNullException">obj</exception>
- 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<IReadOnlyList<IResultSetValue>> ExecuteQuery(this IStatement This)
+ public static IEnumerable<IReadOnlyList<IResultSetValue>> ExecuteQuery(this IStatement statement)
{
- while (This.MoveNext())
+ while (statement.MoveNext())
{
- yield return This.Current;
+ yield return statement.Current;
}
}
}