aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Data/SqliteExtensions.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2020-04-22 13:16:08 +0200
committerGitHub <noreply@github.com>2020-04-22 13:16:08 +0200
commit07326c1d9b1a74b6802cd4187104c4272d59e28e (patch)
tree1061f46729d67671eeb9b6bd71320732e83ccef9 /Emby.Server.Implementations/Data/SqliteExtensions.cs
parentdaed41815f23795aad7f54965a8ef7eae44a1e08 (diff)
parenta85b1dcba663fe3bbb2441380cd8da382c92f2bd (diff)
Merge branch 'master' into fix-auth-response-codes
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;
}
}
}