Ejemplo n.º 1
0
 /// <summary>
 /// Returns lazily converted read-only collection.
 /// </summary>
 /// <typeparam name="I">Type of items in the source collection.</typeparam>
 /// <typeparam name="O">Type of items in the target collection.</typeparam>
 /// <param name="collection">Read-only collection to convert.</param>
 /// <param name="converter">A collection item conversion function.</param>
 /// <returns>Lazily converted read-only collection.</returns>
 public static ReadOnlyCollectionView <I, O> Convert <I, O>(this IReadOnlyCollection <I> collection, Converter <I, O> converter)
 => Convert(collection, converter.AsValueFunc(true));
 /// <summary>
 /// Returns lazily converted read-only collection.
 /// </summary>
 /// <typeparam name="TInput">Type of items in the source collection.</typeparam>
 /// <typeparam name="TOutput">Type of items in the target collection.</typeparam>
 /// <param name="collection">Read-only collection to convert.</param>
 /// <param name="converter">A collection item conversion function.</param>
 /// <returns>Lazily converted read-only collection.</returns>
 public static ReadOnlyCollectionView <TInput, TOutput> Convert <TInput, TOutput>(this IReadOnlyCollection <TInput> collection, Converter <TInput, TOutput> converter)
 => Convert(collection, converter.AsValueFunc(true));