Quark XML Author can be configured to call any external application that exposes public
methods. The person configuring Quark XML Author simply needs to know the assembly,
class, and method name and what parameters the method expects. For example, the following
method requires that an XML node and an array of Delegates be passed to it:
public bool IsEditableElement(XmlNode node, Delegate[] delegates)
{
try
{
IsEditableElement isEditableElementDelegate = delegates[0] as IsEditableElement;
if(isEditableElementDelegate != null && node != null && node is XmlElement)
{
return isEditableElementDelegate(node);
}
}
catch(Exception e)
{
System.Diagnostics.Debug.WriteLine("IsEditableElement Exception :" + e.Message + "\nStackTrace:" + e.StackTrace);
}
return false;
}
As long as the assembly and class to which this method belongs are known, Quark XML
Author can be configured to supply the XML node and any delegates that the method
requires. The method would do its work and return a Boolean value to Quark XML Author
to be acted upon.
In addition to being able to call external methods, Quark XML Author exposes its own
methods that can be called by external methods via delegates. Delegates are function
pointers to Quark XML Author methods that can be passed on to external DLLs. The External
DLLs may then call the methods to perform operations within the application. Custom
methods can accept delegates by implementing the Delegate[] argument type.