Table of Contents
Extensions for arrays
public static class ArrayExt
Inheritance System.Object ArrayExt
Return this with Items added to it
public static T[] AddTo<T>(this T[] array, System.Collections.Generic.List<T> objectsToAdd)
where T : Object;
T
The Type of the Items you want to add
objectsToAdd
System.Collections.Generic.List<T>
Items you want to add
Return this with an Item added to it
public static T[] AddTo<T>(this T[] array, T objectToAdd)
where T : Object;
T
The Type of the Item you want to add
objectToAdd
T
Item to add to this
Return this with Items added to it
public static T[] AddTo<T>(this T[] array, T[] objectsToAdd)
where T : Object;
T
The Type of the Items you want to add
Items you want to add
Return whether or not there are any elements in this that match the predicate
public static bool Any<T>(this T[] array, System.Func<T,bool> predicate);
T
predicate
System.Func<T,System.Boolean>
Return whether or not there are any elements in this
public static bool Any<T>(this T[] array);
T
Checks if the parameter array has the given types
public static bool CheckTypes<T1,T2,T3,T4,T5,T6>(this object[] parameters, out T1 param1, out T2 param2, out T3 param3, out T4 param4, out T5 param5, out T6 param6);
T1
T2
T3
T4
T5
T6
parameters
System.Object[]
param1
T1
param2
T2
param3
T3
param4
T4
param5
T5
param6
T6
Checks if the parameter array has the given types
public static bool CheckTypes<T1,T2,T3,T4,T5>(this object[] parameters, out T1 param1, out T2 param2, out T3 param3, out T4 param4, out T5 param5);
T1
T2
T3
T4
T5
parameters
System.Object[]
param1
T1
param2
T2
param3
T3
param4
T4
param5
T5
Checks if the parameter array has the given types
public static bool CheckTypes<T1,T2,T3,T4>(this object[] parameters, out T1 param1, out T2 param2, out T3 param3, out T4 param4);
T1
T2
T3
T4
parameters
System.Object[]
param1
T1
param2
T2
param3
T3
param4
T4
Checks if the parameter array has the given types
public static bool CheckTypes<T1,T2,T3>(this object[] parameters, out T1 param1, out T2 param2, out T3 param3);
T1
T2
T3
parameters
System.Object[]
param1
T1
param2
T2
param3
T3
Checks if the parameter array has the given types
public static bool CheckTypes<T1,T2>(this object[] parameters, out T1 param1, out T2 param2);
T1
T2
parameters
System.Object[]
param1
T1
param2
T2
Checks if the parameter array has the given types
public static bool CheckTypes<T1>(this object[] parameters, out T1 param1);
T1
parameters
System.Object[]
param1
T1
Return a duplicate of this Array
public static T[] Duplicate<T>(this T[] array);
T
Return a duplicate of this array as type TCast
public static TCast[] DuplicateAs<TSource,TCast>(this TSource[] array)
where TSource : Object
where TCast : Object;
TSource
The original Array Type
TCast
The Cast type
Retrieves all the elements that match the conditions defined by the specified predicate.
public static T[] FindAll<T>(this T[] array, System.Predicate<T> match);
T
match
System.Predicate<T>
The Predicate delegate that defines the conditions of the elements to search for.
Performs the specified action on each element
public static void ForEach<T>(this T[] array, System.Action<T> action);
T
action
System.Action<T>
Action to preform on each element
Return the first Item of type TCast
public static TCast GetItemOfType<TSource,TCast>(this TSource[] array)
where TSource : Object
where TCast : Object;
TSource
TCast
The Type of the Item you want
Return all Items of type TCast
public static System.Collections.Generic.IEnumerable<TCast> GetItemsOfType<TSource,TCast>(this TSource[] array)
where TSource : Object
where TCast : Object;
TSource
TCast
The Type of the Items you want
System.Collections.Generic.IEnumerable<TCast>
Check if this has any items of type TCast
public static bool HasItemsOfType<TSource,TCast>(this TSource[] array)
where TSource : Object
where TCast : Object;
TSource
TCast
The Type you're checking for
Returns whether an int array is a valid set of tiers for a Tower
public static bool IsValid(this int[] tiers);
tiers
System.Int32[]
Returns the index of the highest tier, then the middle, then the lowest
Breaks ties by Middle Path >> Top Path >> Bottom Path
public static int[] Order(this int[] arr);
arr
System.Int32[]
A string with all array elements printed together with no spaces
Useful for the suffix for Tower IDS like DartMonkey-230
public static string Printed(this int[] arr);
arr
System.Int32[]
The array
Return this with the first Item of type TCast removed
public static TSource[] RemoveItem<TSource,TCast>(this TSource[] array, TCast itemToRemove)
where TSource : Object
where TCast : Object;
TSource
TCast
The Type of the Item you want to remove
itemToRemove
TCast
The specific Item to remove
Return this with the first Item of type TCast removed
public static TSource[] RemoveItemOfType<TSource,TCast>(this TSource[] array)
where TSource : Object
where TCast : Object;
TSource
TCast
The Type of the Item you want to remove
Return this with all Items of type TCast removed
public static TSource[] RemoveItemsOfType<TSource,TCast>(this TSource[] array)
where TSource : Object
where TCast : Object;
TSource
TCast
The Type of the Items that you want to remove
Return as Il2CppSystem.List
public static List<T> ToIl2CppList<T>(this T[] array)
where T : Object;
T
Il2CppSystem.Collections.Generic.List
Return as Il2CppReferenceArray
public static Il2CppReferenceArray<T> ToIl2CppReferenceArray<T>(this T[] array)
where T : Object;
T
Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppReferenceArray
Return as LockList
public static LockList<T> ToLockList<T>(this T[] array);
T
Il2CppAssets.Scripts.Utils.LockList
Version of TryCast without the generic restriction
private static bool TryCast<T>(Il2CppObjectBase obj, out T t);
T
obj
Il2CppInterop.Runtime.InteropTypes.Il2CppObjectBase
t
T