You are here: Plugin API > Best Practices/Guidelines
Best Practices/Guidelines
Target Framework
- Currently, the Flare API framework only supports libraries targeted to .NET Framework 4.0.
Initialization
- IPlugin.Initialize(IHost) should only be used to set the instance of IHost passed in to a class variable.
- Calls to obtain the editor or navigation context should be done in IPlugin.Execute().
Cleaning Up
- Events should be properly detached.
- Changes made to the UI should be reverted back to its original state (ribbon, context menus, tool strip, etc.).
- IHost.Dispose() should be called in IPlugin.Stop(). This will dispose of most of the menu bar items and ribbon items added.
- The IPlugin.IsActivated property should be set to false.
References
- The working directory is the base application directory. If you are passing in a URL to any of the interface methods, relative paths are relative to the "Plugins" directory. For example, "DemoPlugin/Icons/Filter.png" maps to C:/FlareInstallPath/Flare.app/Plugins/DemoPlugin/Icons/Filter.png