To write your own plugin, you need to follow a few basic rules:
- It should be an empty constructor or a constructor that accepts an int variable (the Win32 window handle of your app’s window hosting the plugin).
- Your class library can contain multiple classes – you’ll need an “extra-object” entry for each class with a unique name.
Global events should be of the form: public event Action<object, object> onMyEvent (where you can pass any number of object parameters).
- Your app will crash if trying to load a plugin that declares a public event of a different form (i.e. that doesn’t pass objects).
- The best practice is to implement asynchronous only functions that accepts a callback function that is triggered when completed:
public void add(int x, int y, Action<object> callback)
- Your DLL needs to be compiled to target the x86 platform (in the future we will support Any CPU)