-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathLoaderAwareExample.cs
More file actions
37 lines (32 loc) · 912 Bytes
/
LoaderAwareExample.cs
File metadata and controls
37 lines (32 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using SS.Core;
using SS.Core.ComponentInterfaces;
namespace Example.ModuleLifeCycleExamples;
/// <summary>
/// This is an example of hooking into the PostLoad and PreUnload steps of the module life-cycle.
/// </summary>
/// <remarks>
/// Configure the module to be attached in the arena.conf file:
/// <code>
/// [ Modules ]
/// AttachModules = Example.ModuleLifeCycleExamples.LoaderAwareExample
/// </code>
/// </remarks>
public sealed class LoaderAwareExample : IModule, IModuleLoaderAware
{
public bool Load(IComponentBroker broker)
{
return true;
}
public void PostLoad(IComponentBroker broker)
{
// Do something after all modules have been loaded.
}
public void PreUnload(IComponentBroker broker)
{
// Do something before all modules are to be unloaded.
}
public bool Unload(IComponentBroker broker)
{
return true;
}
}