Table of Contents

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?)

Filters out any Delegates with non-static methods targeting null, local, or removed world element.

public static Delegate? FilterGlobalWorldDelegate(this Delegate? @delegate)

Parameters

delegate Delegate

The Delegate to filter.

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

delegates IEnumerable<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

elements IEnumerable<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

T

The type of the world elements.

FilterWorldDelegate(Delegate?)

Filters out any Delegates with non-static methods targeting null or removed world element.

public static Delegate? FilterWorldDelegate(this Delegate? @delegate)

Parameters

delegate Delegate

The Delegate to filter.

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

delegates IEnumerable<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

elements IEnumerable<T>

The sequence of world elements to filter.

Returns

IEnumerable<T>

The sequence of world elements without any null or removed ones.

Type Parameters

T

The type of the world elements.

GetAllocatingUser(IWorldElement?)

Gets the allocating FrooxEngine.User of this world element.

public static User? GetAllocatingUser(this IWorldElement? element)

Parameters

element IWorldElement

The 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

element IWorldElement

The world element to get the allocating FrooxEngine.User of.

user User

This world element's allocating FrooxEngine.User if valid; otherwise, null.

Returns

bool

true if this world element has a valid allocating FrooxEngine.User; otherwise, false.

Remarks

Implementation is the same as the Allocating User ProtoFlux node.