mirror of https://github.com/ogoun/Zero.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
457 B
14 lines
457 B
namespace MemoryPools.Collections.Linq
|
|
{
|
|
public static partial class PoolingEnumerable
|
|
{
|
|
/// <summary>
|
|
/// Casts all elements to the given type. Complexity = O(N)
|
|
/// </summary>
|
|
public static IPoolingEnumerable<TR> Cast<TR>(this IPoolingEnumerable source)
|
|
{
|
|
if (source is IPoolingEnumerable<TR> res) return res;
|
|
return Pool<CastExprEnumerable<TR>>.Get().Init(source);
|
|
}
|
|
}
|
|
} |