public static ExtendedList <T> FromList(List <T> list) { ExtendedList <T> result = new ExtendedList <T>(); foreach (T item in list) { result.Add(item); } return(result); }
public ExtendedList <TNew> Parse <TNew>(Func <T, TNew> selector) where TNew : class { ExtendedList <TNew> result = new ExtendedList <TNew>(); foreach (T item in this) { result.Add(selector(item)); } return(result); }
public static ExtendedList <T> FromArray(Array array) { ExtendedList <T> result = new ExtendedList <T>(); foreach (T item in array) { result.Add(item); } return(result); }
public ExtendedList <TNew> ParseNullable <TNew>(Func <T, TNew> selector) { ExtendedList <TNew> result = new ExtendedList <TNew>(); foreach (T item in this) { if (item == null) { result.Add(default(TNew)); } else { result.Add(selector(item)); } } return(result); }