Table of Contents
Extensions for the normal System IEnumerable class
public static class IEnumerableExt
Inheritance System.Object IEnumerableExt
Returns the argument that maximizes the given value
public static T ArgMax<T,K>(this System.Collections.Generic.IEnumerable<T> source, System.Func<T,K> map=null, System.Collections.Generic.IComparer<K> comparer=null);
T
K
source
System.Collections.Generic.IEnumerable<T>
map
System.Func<T,K>
comparer
System.Collections.Generic.IComparer<K>
Casts a reference array to an IEnumerable of a different Il2cpptype.
Objects that aren't of the specified type will end up as null in the result
public static System.Collections.Generic.IEnumerable<TCast> CastAll<TSource,TCast>(this System.Collections.Generic.IEnumerable<TSource> list)
where TSource : Object
where TCast : Object;
TSource
TCast
list
System.Collections.Generic.IEnumerable<TSource>
System.Collections.Generic.IEnumerable<TCast>
Deconstruct IGrouping to list
public static void Deconstruct<K,V>(this System.Linq.IGrouping<K,V> grouping, out K k, out System.Collections.Generic.List<V> v);
K
V
grouping
System.Linq.IGrouping<K,V>
k
K
v
System.Collections.Generic.List<V>
Filters the elements of the IEnumerable by if their Il2Cpp type is T
public static System.Collections.Generic.IEnumerable<T> OfIl2CppType<T>(this System.Collections.IEnumerable ienumerable)
where T : Il2CppObjectBase;
T
The Il2Cpp type to filter by
ienumerable
System.Collections.IEnumerable
System.Collections.Generic.IEnumerable<T>
Repeats each element in the sequence n times, keeping the same order of elements
public static System.Collections.Generic.IEnumerable<T> Repeat<T>(this System.Collections.Generic.IEnumerable<T> enumerable, int n);
T
enumerable
System.Collections.Generic.IEnumerable<T>
System.Collections.Generic.IEnumerable<T>
Return as Il2CppSystem.List
public static List<T> ToIl2CppList<T>(this System.Collections.Generic.IEnumerable<T> enumerable);
T
enumerable
System.Collections.Generic.IEnumerable<T>
Il2CppSystem.Collections.Generic.List
Return as Il2CppReferenceArray
public static Il2CppReferenceArray<T> ToIl2CppReferenceArray<T>(this System.Collections.Generic.IEnumerable<T> enumerable)
where T : Object;
T
enumerable
System.Collections.Generic.IEnumerable<T>
Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray
Return as LockList
public static LockList<T> ToLockList<T>(this System.Collections.Generic.IEnumerable<T> enumerable);
T
enumerable
System.Collections.Generic.IEnumerable<T>