From 7d46ae9e3e4666068b0a942d4b0b60d60bedaab8 Mon Sep 17 00:00:00 2001 From: vertino Date: Tue, 5 Jun 2012 23:53:28 -0100 Subject: [PATCH] uQuery: Changed the generic base-type of a few extension methods. --- umbraco/presentation/umbraco/uQuery/ContentExtensions.cs | 2 +- umbraco/presentation/umbraco/uQuery/NodeExtensions.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/umbraco/presentation/umbraco/uQuery/ContentExtensions.cs b/umbraco/presentation/umbraco/uQuery/ContentExtensions.cs index 0913fa9c5a..d2af80ea6c 100644 --- a/umbraco/presentation/umbraco/uQuery/ContentExtensions.cs +++ b/umbraco/presentation/umbraco/uQuery/ContentExtensions.cs @@ -135,7 +135,7 @@ namespace umbraco /// /// Returns the specified number of random content items from a collection of content items. /// - public static IEnumerable GetRandom(this IList items, int numberOfItems) + public static IEnumerable GetRandom(this ICollection items, int numberOfItems) { if (numberOfItems > items.Count) { diff --git a/umbraco/presentation/umbraco/uQuery/NodeExtensions.cs b/umbraco/presentation/umbraco/uQuery/NodeExtensions.cs index 824bba21c9..869391aaca 100644 --- a/umbraco/presentation/umbraco/uQuery/NodeExtensions.cs +++ b/umbraco/presentation/umbraco/uQuery/NodeExtensions.cs @@ -456,7 +456,7 @@ namespace umbraco /// /// Returns a random node from a collection of nodes. /// - public static Node GetRandom(this List nodes) + public static Node GetRandom(this IList nodes) { var random = umbraco.library.GetRandom(); return nodes[random.Next(0, (nodes.Count - 1))]; @@ -470,7 +470,7 @@ namespace umbraco /// /// Returns the specified number of random nodes from a collection of nodes. /// - public static IEnumerable GetRandom(this List nodes, int numberOfItems) + public static IEnumerable GetRandom(this IList nodes, int numberOfItems) { var output = new List(numberOfItems);