Table of Contents

Class ScriptHandleFactory

Namespace
Anvil.Services
Assembly
NWN.Anvil.dll

A service for registering C# functions as script handlers dynamically.

[ServiceBinding(typeof(ScriptHandleFactory))]
[ServiceBinding(typeof(IScriptDispatcher))]
public sealed class ScriptHandleFactory : IScriptDispatcher
Inheritance
ScriptHandleFactory
Implements
Inherited Members
Extension Methods

Properties

ExecutionOrder

Methods

CreateUniqueHandler(Func<CallInfo, ScriptHandleResult>)

Creates a unique script callback handle for the specified callback method.
The returned handle can be used for certain API functions that take a script name as a parameter.

IsScriptRegistered(string)

Gets if the specified script name has a script handler already defined.

RegisterScriptHandler(string, Func<CallInfo, ScriptHandleResult>)

Registers the specified action as a callback for the specified script name.

UnregisterScriptHandler(string)

Unregisters any handler assigned to the specified script.