Click or drag to resize
IPlugin Interface
Describes the interface for a class that plugin DLLs must implement in order to be loaded by Virtual Radar Server.

Namespace: VirtualRadar.Interface
Assembly: VirtualRadar.Interface (in VirtualRadar.Interface.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public interface IPlugin

The IPlugin type exposes the following members.

Properties
  NameDescription
Public propertyHasOptions
Gets a value indicating that the plugin has user-configurable settings.
Public propertyId
Gets the unique identifier of the plugin.
Public propertyName
Gets the name of the plugin. This is only shown to the user, it is otherwise unused by Virtual Radar Server.
Public propertyPluginFolder
Gets or sets the folder that the plugin has been installed into.
Public propertyStatus
Gets a short string describing the state of the plugin (e.g. Disabled, Enabled, Writing to XYZ etc.).
Public propertyStatusDescription
Gets a longer string giving more information on Status. If no description is appropriate, i.e. Status already says everything you want to say, then return an empty string or null.
Public propertyVersion
Gets the version number of the plugin. This is only shown to the user, it is otherwise unused by Virtual Radar Server.
Top
Methods
  NameDescription
Public methodGuiThreadStartup
Called by VRS on the GUI thread after Startup(PluginStartupParameters) has been called.
Public methodRegisterImplementations
Called by VRS during the early stages of program startup to give the plugin a chance to register its own implementations of the program interfaces. This is called before the UI has been built up, do not make GUI calls from here.
Public methodShowWinFormsOptionsUI
Called by VRS when the user wants to change the options for the application. This will not be called if HasOptions is false. You must present the options using WinForms. The function will be called on the GUI thread.
Public methodShutdown
Called by VRS when the program is closing down, before the web server etc. have been destroyed. This may be called on a background thread, do not make GUI calls from within here.
Public methodStartup
Called by VRS towards the end of the splash screen, after the web server etc. have been built up but before the main window is displayed. This is called on a background thread. Do not make any calls that must be made on the GUI thread from here.
Top
Events
  NameDescription
Public eventStatusChanged
Raised by the plugin whenever Status or StatusChanged has been updated by the plugin.
Top
Remarks

Plugin libraries are loaded by Virtual Radar Server during startup. The program looks for DLLs whose name matches VirtualRadar.Plugin.*.dll in subfolders below the Virtual Radar Server "Plugins" folder. It loads each DLL into the process and then searches for a public class that implements this interface. If it can find one then it instantiates the object implementing the interface and makes calls upon it at various points in the life of the application to give the plugin the opportunity to change the way the program behaves.

See Also