A .NET Assembly endpoint is used to specify an assembly external to InRule, whose static methods may subsequently be used from within rule expressions, or using the Execute Method action.
(If the static functions contain custom types, prior to the above steps, you need to load that assembly to the schema.)
The following is a description of the .NET Assembly Function Library Edit form:
Name
Name of the endpoint. Derived from Assembly name on first assembly load.
Assembly
Specifies the assembly. At runtime, this assembly is searched for in the "EndPointAssemblies/" subdirectory (unless otherwise configured) of the host application's binaries directory. (The host application is either irAuthor / irVerify or a custom application using irSDK).
The "…" selection prompts for an Assembly to load from the above directory by default. It's best to copy your assemblies to this directory in order to use irVerify, which looks for them there.
Settings
Allows you to enable/disable the following options:
- "Show All Classes" specifies whether to show all classes or only selected ones. Note that a "Reload" is required to update the list of unselected classes when this screen is re-entered (indicated when "From working set" is displayed).
- "Show All Methods" specifies whether to show all methods or only the usable ones.
Reload
Reloads the assembly information from the directory location described above. Use this to resynchronize the rule app with updated assembly information.
Classes
Each public class in the specified assembly having one or more usable public static methods is shown.
The "Alias" column defines the prefix to use when referring to a static "Function Library" method. Note this "Alias" name may be changed by clicking on it.
The "Function Lib" column, enabled only for classes having one or more usable public static methods, specifies whether these static methods will be enabled for use within the rule app.
Methods
Each public "static" method in the selected class is shown.
"Usable" indicates whether the method is usable by the rule app (only methods having return types and parameters readily converted to rule app intrinsic types are usable).
"Static" indicates whether this is a "static" or "instance" method.
"Run in Isolated AppDomain" - Causes the assembly to be loaded in an appdomain separate from the rule engine.
Edit Template
In certain situations, references to imported functions may be better represented with a different name or set of parameters. To change the template text for an imported function, navigate to the .NET assembly function library and click the 'Edit Template' button.
The default signature text for the method will be displayed.
Make adjustments and click OK
The end result following a modification when using the function reference in a language rule is as follows:
Notes
- The text template for each imported .NET assembly function can be changed to make the function reference more friendly.
- As with imported instance methods, the state refresh options for a static method library can be adjusted for performance considerations
Comments
0 comments
Please sign in to leave a comment.