The first step is to modify the signature of the context class. It needs to be a non-static class, inheriting from AbstractContext<T>
. It should also have the [RegisterAllProperties]
attribute.
[RegisterAllProperties]
public class StudentContext : AbstractContext<StudentContext> {
The second step is to register the context. It looks like this is done by calling Module.RegisterContext from the OnInit method of a Module. In my case, I used a module called PGPLoaderModule:
public class PGPLoaderModule : Module {
protected override void OnInit() {
base.OnInit();
Module.RegisterContext<StudentContext>("StudentContext");