Custom Function Sample
This is an example of how a class would be written in C# so that it may "plugged-in"
to our data transformation products that use our proprietary Rules Engine technology.
To use, compile the code below as a class library and copy the resulting output
.dll file into the PlugIn directory under the application directory (e.g. C:\Program
Files\Astera Software\Astera DataMapper 2008\PlugIn). After this is done,
the next time you start the application, you'll see the below function under the
"Custom Sample" category in the expression builder. To use custom functions,
you must have .NET 2.0, a C# compiler, and basic programming skills. Once
you start using custom functions, you'll find that the types of mapping that can
be perform become almost limitless.
using System;
using System.Collections.Generic;
using System.Text;
using Astera.Core;
namespace CustomRuleFunctionSample
{
[
RuleFunctionClass]
public class CustomFunctionSample
{
[Function( "This function demonstrates use of Plug-in function in Astera Expression Engine.")]
[Category("Custom Sample")]
[Parameter("str1", "First string")]
[Parameter("str2", "Second string")]
public static string Concatenate( string str1, string str2)
{
return string.Format( "{0}{1}", str1, str2);
}
}
}