|
|
||
![]() |
||
Figure 1. Structure Your Extensible App Properly. The key to extensibility is the ExtensibilityLib DLL, which defines both the FormExtender custom attribute (used to mark entry points in plug-ins) and the FormExtenderManager class. When the main application creates a form, it should notify the event by calling the FormExtenderManager.NotifyFormCreation method, which in turn invokes all the plug-ins that have registered themselves for that specific form and gives them an opportunity to modify the UI, add new controls, and so forth. You can simplify the plug-in structure by gathering all the main app’s forms in a separate DLL, so that plug-ins can reference those form types directly. If you compile these forms in the MainApp.exe, plug-ins can reference them only through late binding. |
||