...
Calling a function defined in a plug-in is done via the intrinsic functions RUNPLUGIN (returning a value) and RUNPLUGIN$ (returning a string).
Place the plug-in (the .dll file) in the knowledgebase folder under Applic\Plugins\
The KE has to define the return type, the name, the version and the input parameters for the function.
...
The communication with Quaestor is done by implementing the interface IQFunctionPlugin and using the attributes defined in the IQPluginMetadata interface. Both of them are defined in the QInterfaces.dll . This library will soon be is available on the MARIN nuGet server.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
/// <summary> /// Defines a method to be called by Quaestor. /// </summary> public interface IQFunctionPlugin { /// <summary> /// Defines a function to be executed by Quaestor. /// The KE must inform the developer about the return type and the order and types of the input values /// </summary> /// <param name="errorMessage"></param> /// <param name="inputValues">Contains the input values; it can contain only string and double. /// The order and type are specified by the KE.</param> /// <returns>The result of the calculation. It can be only string or double.</returns> object Compute(out string errorMessage, List<object> inputValues); } |
Steps in implementing a Quaestor plug-in:
Each new function needs to be implemented in a separate class that inherits from the IQFunctionPlugin interface.
...