Ejemplo n.º 1
0
 /// <summary>
 /// Retrieves the element that matches the conditions defined by the specified <paramref name="selector"/>.
 /// </summary>
 /// <typeparam name="TSource">The type of the elements of the sequence.</typeparam>
 /// <typeparam name="T">The type of the parameter of the function delegate <paramref name="selector"/>.</typeparam>
 /// <param name="source">The sequence to search.</param>
 /// <param name="selector">The function delegate that defines the condition of the element to retrieve.</param>
 /// <param name="arg">The parameter of the function delegate <paramref name="selector"/>.</param>
 /// <returns>A <typeparamref name="TSource"/> element that matched the conditions defined by the specified <paramref name="selector"/>.</returns>
 public static TSource SelectOne <TSource, T>(this IEnumerable <TSource> source, Func <IEnumerable <TSource>, T, TSource> selector, T arg)
 {
     return(EnumerableUtility.SelectOne(source, selector, arg));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Retrieves the element that matches the conditions defined by the specified <paramref name="selector"/>.
 /// </summary>
 /// <typeparam name="TSource">The type of the elements of the sequence.</typeparam>
 /// <typeparam name="T1">The type of the first parameter of the function delegate <paramref name="selector"/>.</typeparam>
 /// <typeparam name="T2">The type of the second parameter of the function delegate <paramref name="selector"/>.</typeparam>
 /// <typeparam name="T3">The type of the third parameter of the function delegate <paramref name="selector"/>.</typeparam>
 /// <param name="source">The sequence to search.</param>
 /// <param name="selector">The function delegate that defines the condition of the element to retrieve.</param>
 /// <param name="arg1">The first parameter of the function delegate <paramref name="selector"/>.</param>
 /// <param name="arg2">The second parameter of the function delegate <paramref name="selector"/>.</param>
 /// <param name="arg3">The third parameter of the function delegate <paramref name="selector"/>.</param>
 /// <returns>A <typeparamref name="TSource"/> element that matched the conditions defined by the specified <paramref name="selector"/>.</returns>
 public static TSource SelectOne <TSource, T1, T2, T3>(this IEnumerable <TSource> source, Func <IEnumerable <TSource>, T1, T2, T3, TSource> selector, T1 arg1, T2 arg2, T3 arg3)
 {
     return(EnumerableUtility.SelectOne(source, selector, arg1, arg2, arg3));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Retrieves the element that matches the conditions defined by the specified <paramref name="selector"/>.
 /// </summary>
 /// <typeparam name="TSource">The type of the elements of the sequence.</typeparam>
 /// <typeparam name="T1">The type of the first parameter of the function delegate <paramref name="selector"/>.</typeparam>
 /// <typeparam name="T2">The type of the second parameter of the function delegate <paramref name="selector"/>.</typeparam>
 /// <typeparam name="T3">The type of the third parameter of the function delegate <paramref name="selector"/>.</typeparam>
 /// <typeparam name="T4">The type of the fourth parameter of the function delegate <paramref name="selector"/>.</typeparam>
 /// <typeparam name="T5">The type of the fifth parameter of the function delegate <paramref name="selector"/>.</typeparam>
 /// <param name="source">The sequence to search.</param>
 /// <param name="selector">The function delegate that defines the condition of the element to retrieve.</param>
 /// <param name="arg1">The first parameter of the function delegate <paramref name="selector"/>.</param>
 /// <param name="arg2">The second parameter of the function delegate <paramref name="selector"/>.</param>
 /// <param name="arg3">The third parameter of the function delegate <paramref name="selector"/>.</param>
 /// <param name="arg4">The fourth parameter of the function delegate <paramref name="selector"/>.</param>
 /// <param name="arg5">The fifth parameter of the function delegate <paramref name="selector"/>.</param>
 /// <returns>A <typeparamref name="TSource"/> element that matched the conditions defined by the specified <paramref name="selector"/>.</returns>
 public static TSource SelectOne <TSource, T1, T2, T3, T4, T5>(IEnumerable <TSource> source, Func <IEnumerable <TSource>, T1, T2, T3, T4, T5, TSource> selector, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
 {
     return(EnumerableUtility.SelectOne(source, selector, arg1, arg2, arg3, arg4, arg5));
 }