Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Linq;
using System.Reflection;

using JetBrains.Annotations;

internal static class EnumerableExtensions
{
private static readonly MethodInfo BuildTypedArrayMethodInfo =
Expand Down Expand Up @@ -44,7 +46,7 @@ public static bool TryGetEnumerableSingleTypeArgument(this Type type, out Type a
return false;
}

public static object ToTypedArray(this IEnumerable items, Type itemType)
public static object ToTypedArray([NoEnumeration] this IEnumerable items, Type itemType)
{
var method = BuildTypedArrayMethodInfo.MakeGenericMethod(itemType.NotNull(nameof(itemType)));
return method.Invoke(null, new object[] { items.NotNull(nameof(items)) });
Expand Down
Loading