public static RecycleList <T> MakeValueEnumerable <TStructEnumerable>(ref TStructEnumerable enumerable) where TStructEnumerable : struct, IEnumerable <T> { RecycleList <T> list = RecycleList <T> .Make(); list.AddRange((TStructEnumerable)enumerable); return(list); }
public static RecycleList <T> Make <TClassEnumerable>(TClassEnumerable enumerable) where TClassEnumerable : class, IEnumerable <T> { RecycleList <T> list = RecycleList <T> .Make(); list.AddRange(enumerable); return(list); }
public static RecycleList <T> MakeFromValuedEnumerator <TEnumerator>(ref TEnumerator enumerator) where TEnumerator : struct, IEnumerator <T> { RecycleList <T> list = RecycleList <T> .Make(); while (enumerator.MoveNext()) { list.Add((T)enumerator.Current); } enumerator.Dispose(); return(list); }
public RecycleList <T> Clone() { return(RecycleList <T> .Make <RecycleList <T> >(this)); }