Changed extension method to take IEnumerable

This commit is contained in:
soukoku
2014-04-09 21:48:36 -04:00
parent 14bb274f0c
commit 9d30efe92a
4 changed files with 7 additions and 7 deletions

View File

@@ -10,11 +10,11 @@ namespace NTwain.Values
/// </summary>
public static class ValueConverter
{
public static IList<T> CastToEnum<T>(this IList<object> list) where T : struct,IConvertible
public static IList<T> CastToEnum<T>(this IEnumerable<object> list) where T : struct,IConvertible
{
return list.CastToEnum<T>(true);
}
public static IList<T> CastToEnum<T>(this IList<object> list, bool tryUpperWord) where T : struct,IConvertible
public static IList<T> CastToEnum<T>(this IEnumerable<object> list, bool tryUpperWord) where T : struct,IConvertible
{
return list.Select(o => o.ConvertToEnum<T>(tryUpperWord)).ToList();
}