Merge pull request #2880 from Bond-009/deadcode2

Remove dead function
pull/2903/head
dkanada 4 years ago committed by GitHub
commit ae7153b65b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,8 +3,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.IO;
using MediaBrowser.Model.Serialization;
using SQLitePCL.pretty; using SQLitePCL.pretty;
namespace Emby.Server.Implementations.Data namespace Emby.Server.Implementations.Data
@ -109,25 +107,6 @@ namespace Emby.Server.Implementations.Data
return null; 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) public static void Attach(SQLiteDatabaseConnection db, string path, string alias)
{ {
var commandText = string.Format( 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;
} }
} }
} }

Loading…
Cancel
Save