|
-
Jun 29th, 2006, 05:41 PM
#1
Thread Starter
PowerPoster
[2.0] plugin events
I know how to (almost) create a plugin
you need to create an interface which a plugin implements.
You also need to create an interface which allows the "host" to be known to the plugin (your application)
thats all cool.
But now, how do I register events from the plugin to the main application (host) so that if I raise an event in the host, the plugins who have these events will also be notified/alerted/executed of the event?
I have a delegate which has a string signature:
public delegate void DoSomething(string text);
event:
public event DoSomething OnEventDoSomething;
the event is in the plugin, and an eventhandler has been created.
but now after loading the assembly/instantiating the plugin from the host, how can I register the event and execute it?
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|