Table of Contents

Method TryGetCurrentFactory

Namespace
MonoMod.RuntimeDetour
Assembly
MonoMod.RuntimeDetour.dll

TryGetCurrentFactory(out IDetourFactory)

Tries to get the IDetourFactory active at the current location.
public static bool TryGetCurrentFactory(out IDetourFactory detourFactory)

Parameters

detourFactory IDetourFactory
The active IDetourFactory.

Returns

bool
true if an IDetourFactory was found; false otherwise.

Remarks

This method walks up the context stack, calling TryGetFactory(out IDetourFactory) on each context it encounters. It then returns the result that the first context which returned true returned. If none did, it checks the global context.