DevPlugin(English) - OsuSync/Sync GitHub Wiki

The plugin is the unit of the master program scheduling and must be instantiated automatically by program. Program will recognize plugins(.dll) which they are in subfolder named "Plugins",then they will be loaded into assemblies of program instance.

The Plugin is implemented by inheriting the class named "Plugin".The program will load all DLL files in the "\Plugins" folder based on the class signature,but only classes that inherit the "Plugin" class are initialized.

class Plugin Method/Member

Plugin class members and their member functions:

Modifier/Access Member Name Type Description
public readonly Name String Plugin Name
public readonly Author String Plugin Author
public EventBus BaseEventDispatcher<IPluginEvent> The plugin event binding/trigger
Modifier/Access Function Signature Return Type Description
public Plugin(string Name, string Author) .ctor() Constructor
protected getHoster() SyncHost Get SyncHost instance in current program.
public getName() string Get plugin name(compatible)
public getAuthor() string Get plugin author(compatible)
public virtual OnDisable() void The method when this plugin is disable and will call it.
public virtual OnEnable() void The method when this plugin is enable and will call it.