Anvil
Anvil.AnvilCore Class Reference

Handles bootstrap and interop between NWN, NWN.Core and the Anvil API. The entry point of the implementing module should point to this class.
Until Init(IntPtr, int, IServiceManager) is called, all APIs are unavailable for usage. More...

+ Inheritance diagram for Anvil.AnvilCore:
+ Collaboration diagram for Anvil.AnvilCore:

Static Public Member Functions

static ? T GetService< T > ()
 Gets the specified anvil service instance. More...
 
static unsafe int Init (IntPtr arg, int argLength, IServiceManager? serviceManager=default)
 Entrypoint to start Anvil. More...
 
static void Reload ()
 Initiates a complete reload of plugins and Anvil services.
This will reload all plugins. More...
 

Detailed Description

Handles bootstrap and interop between NWN, NWN.Core and the Anvil API. The entry point of the implementing module should point to this class.
Until Init(IntPtr, int, IServiceManager) is called, all APIs are unavailable for usage.

Member Function Documentation

◆ GetService< T >()

static ? T Anvil.AnvilCore.GetService< T > ( )
inlinestatic

Gets the specified anvil service instance.

Template Parameters
TThe service type to get.
Returns
The associated anvil service instance.

◆ Init()

static unsafe int Anvil.AnvilCore.Init ( IntPtr  arg,
int  argLength,
IServiceManager serviceManager = default 
)
inlinestatic

Entrypoint to start Anvil.

Parameters
argThe NativeHandles pointer, provided by the NWNX bootstrap entry point.
argLengthThe size of the NativeHandles bootstrap structure, provided by the NWNX entry point.
serviceManagerA custom service manager to use instead of the default AnvilServiceManager. For advanced users only.
Returns
The init result code to return back to NWNX.

◆ Reload()

static void Anvil.AnvilCore.Reload ( )
inlinestatic

Initiates a complete reload of plugins and Anvil services.
This will reload all plugins.


The documentation for this class was generated from the following files: