Class CloningExtensions
- Namespace
- Garyon.Extensions
- Assembly
- Garyon.dll
Provides extensions for the ICloneable and ICloneable<T> interfaces.
public static class CloningExtensions
- Inheritance
-
CloningExtensions
- Inherited Members
Methods
CloneListNonGeneric<TElement>(IEnumerable<TElement>)
Clones a range of ICloneable values into a new list.
public static IList<TElement> CloneListNonGeneric<TElement>(this IEnumerable<TElement> range) where TElement : notnull, ICloneable
Parameters
rangeIEnumerable<TElement>The values to clone.
Returns
- IList<TElement>
A list with the cloned instances.
Type Parameters
TElementThe type of the element.
CloneList<TElement>(IEnumerable<TElement>)
Clones a range of ICloneable<T> values into a new list.
public static IList<TElement> CloneList<TElement>(this IEnumerable<TElement> range) where TElement : notnull, ICloneable<TElement>
Parameters
rangeIEnumerable<TElement>The values to clone.
Returns
- IList<TElement>
A list with the cloned instances.
Type Parameters
TElementThe type of the element.
CloneRangeNonGeneric<TElement>(IEnumerable<TElement>)
Clones a range of ICloneable values into a new enumerable.
public static IEnumerable<TElement> CloneRangeNonGeneric<TElement>(this IEnumerable<TElement> range) where TElement : notnull, ICloneable
Parameters
rangeIEnumerable<TElement>The values to clone.
Returns
- IEnumerable<TElement>
An enumerable with the cloned instances. The values are lazily returned via Select<TSource, TResult>(IEnumerable<TSource>, Func<TSource, TResult>).
Type Parameters
TElementThe type of the element.
CloneRange<TElement>(IEnumerable<TElement>)
Clones a range of ICloneable<T> values into a new enumerable.
public static IEnumerable<TElement> CloneRange<TElement>(this IEnumerable<TElement> range) where TElement : notnull, ICloneable<TElement>
Parameters
rangeIEnumerable<TElement>The values to clone.
Returns
- IEnumerable<TElement>
An enumerable with the cloned instances. The values are lazily returned via Select<TSource, TResult>(IEnumerable<TSource>, Func<TSource, TResult>).
Type Parameters
TElementThe type of the element.