Class WorldElementExtensions
- Namespace
- MonkeyLoader.Resonite
- Assembly
- MonkeyLoader.Resonite.Core.dll
Contains extensions for world elements.
public static class WorldElementExtensions
- Inheritance
-
WorldElementExtensions
- Inherited Members
Methods
FilterGlobalWorldDelegate(Delegate?)
public static Delegate? FilterGlobalWorldDelegate(this Delegate? @delegate)
Parameters
Returns
- Delegate
The Delegate if it's a static method or targeting a global and not removed world element; otherwise, null.
FilterGlobalWorldDelegates(IEnumerable<Delegate?>)
Filters this sequence of Delegates for any non-static methods targeting null, local, or removed world elements.
public static IEnumerable<Delegate> FilterGlobalWorldDelegates(this IEnumerable<Delegate?> delegates)
Parameters
delegatesIEnumerable<Delegate>The sequence of Delegates to filter.
Returns
- IEnumerable<Delegate>
The sequence of Delegates without any non-static methods targeting null, local, or removed world elements.
FilterGlobalWorldElements<T>(IEnumerable<T?>)
Filters this sequence for any null, local, or removed elements.
public static IEnumerable<T> FilterGlobalWorldElements<T>(this IEnumerable<T?> elements) where T : class, IWorldElement
Parameters
elementsIEnumerable<T>The sequence of world elements to filter.
Returns
- IEnumerable<T>
The sequence of world elements without any null, local, or removed ones.
Type Parameters
TThe type of the world elements.
FilterWorldDelegate(Delegate?)
public static Delegate? FilterWorldDelegate(this Delegate? @delegate)
Parameters
Returns
- Delegate
The Delegate if it's a static method or targeting a not removed world element; otherwise, null.
FilterWorldDelegates(IEnumerable<Delegate?>)
Filters this sequence of Delegates for any non-static methods targeting null or removed world elements.
public static IEnumerable<Delegate> FilterWorldDelegates(this IEnumerable<Delegate?> delegates)
Parameters
delegatesIEnumerable<Delegate>The sequence of Delegates to filter.
Returns
- IEnumerable<Delegate>
The sequence of Delegates without any non-static methods targeting null or removed world elements.
FilterWorldElements<T>(IEnumerable<T?>)
Filters this sequence for any null or removed elements.
public static IEnumerable<T> FilterWorldElements<T>(this IEnumerable<T?> elements) where T : class, IWorldElement
Parameters
elementsIEnumerable<T>The sequence of world elements to filter.
Returns
- IEnumerable<T>
The sequence of world elements without any null or removed ones.
Type Parameters
TThe type of the world elements.
GetAllocatingUser(IWorldElement?)
Gets the allocating FrooxEngine.User of this world element.
public static User? GetAllocatingUser(this IWorldElement? element)
Parameters
elementIWorldElementThe world element to get the allocating FrooxEngine.User of.
Returns
- User
This world element's allocating FrooxEngine.User if valid; otherwise, null.
Remarks
Implementation is the same as the Allocating User ProtoFlux node.
TryGetAllocatingUser(IWorldElement?, out User?)
Tries to get the allocating FrooxEngine.User of this world element.
public static bool TryGetAllocatingUser(this IWorldElement? element, out User? user)
Parameters
elementIWorldElementThe world element to get the allocating FrooxEngine.User of.
userUserThis world element's allocating FrooxEngine.User if valid; otherwise, null.
Returns
Remarks
Implementation is the same as the Allocating User ProtoFlux node.