aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Extensions/LinqExtensions.cs
diff options
context:
space:
mode:
authorAndrew Rabert <6550543+nvllsvm@users.noreply.github.com>2018-12-28 16:33:42 -0500
committerGitHub <noreply@github.com>2018-12-28 16:33:42 -0500
commit9c49e936f02738faff5e76e0311b48f360990228 (patch)
tree2b13ec9d73d3918ab5119290cb95b79d62751d54 /MediaBrowser.Model/Extensions/LinqExtensions.cs
parentdc4a6026a53e7245182955b9b8e96a655bfe2961 (diff)
parent6e5d2aadaa17d891b9c4b4f17faf1316f43aaee6 (diff)
Merge pull request #288 from Bond-009/toarray
Remove custom ToArray extension
Diffstat (limited to 'MediaBrowser.Model/Extensions/LinqExtensions.cs')
-rw-r--r--MediaBrowser.Model/Extensions/LinqExtensions.cs14
1 files changed, 1 insertions, 13 deletions
diff --git a/MediaBrowser.Model/Extensions/LinqExtensions.cs b/MediaBrowser.Model/Extensions/LinqExtensions.cs
index 09ace42e8..1223e689e 100644
--- a/MediaBrowser.Model/Extensions/LinqExtensions.cs
+++ b/MediaBrowser.Model/Extensions/LinqExtensions.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
+// TODO: @bond Remove
namespace MediaBrowser.Model.Extensions
{
// MoreLINQ - Extensions to LINQ to Objects
@@ -42,19 +43,6 @@ namespace MediaBrowser.Model.Extensions
return source.DistinctBy(keySelector, null);
}
- public static TSource[] ToArray<TSource>(this IEnumerable<TSource> source, int count)
- {
- if (source == null) throw new ArgumentNullException("source");
- if (count < 0) throw new ArgumentOutOfRangeException("count");
- var array = new TSource[count];
- int i = 0;
- foreach (var item in source)
- {
- array[i++] = item;
- }
- return array;
- }
-
/// <summary>
/// Returns all distinct elements of the given source, where "distinctness"
/// is determined via a projection and the specified comparer for the projected type.