HookContext

Namespace: uModPlugins

Assembly: uMod.Core.dll

Inheritance ObjectContextEventCallback<HookEvent, HookContext, Plugin> HookContext

Implements IDisposable, IContext, INameable

Summary

Represents a hook context used to store generic state information

Constructors

Name

Summary

HookContext ()

Create empty hook context object

HookContext (IEnumerable)

HookContext (String, IList<Plugin>)

Create hook context for hook with specified name and hook subscriptions

Properties

Name

Summary

FinalValue

Final value to return when hook context has override

HasConflict

Determine if hook resulted in return conflict

Name

The name of the hook

Overrides

Determine if hook context should override default return behavior

Parent

Parent hook context

ReturnConflicts

Dictionary of all return conflicts

ReturnCount

ReturnValues

Array of return values in hook context

Methods

Name

Summary

AddContext (Object)

Add signature context object

AddContext (Type, Object)

Add signature context object with concrete type

ContainsType (Type)

Determines if context contains type

Dispose ()

Dispose of hook context data

Invoke (HookEvent, Plugin)

Invoke callbacks depending on current hook state

OfType<T> ()

Gets the first context item with the specified generic type

Reset (String, IList<Plugin>)

Reset hook context to be used again

TryInject (Type, out Object)

Try to inject signature context variables

Validate ()

Validate return values to determine conflict scenario