The Call method executes a specified public method defined in the AB Suite system.
Namespace – ABSuite.AccessLayer.Connector.Core
Assembly – Unisys.ABSuite.AccessLayer.Connector.Core (in Unisys.ABSuite.AccessLayer.Connector.Core.dll)
Syntax
Object Call( string method, Object[] args, bool[] modifiers )
Arguments
method – System.String
This argument provides the name of the public method.
args – System.Object[]
This argument provides parameters that are required by the public method.
modifier – bool[]
This argument provides an array of Boolean values that match the args[] array and specifies whether a parameter is passed by reference or not. If the Boolean value in the array is set to true, then the corresponding parameter in the args[] array is passed by reference. The modifier argument can be set to null, which means all parameters are passed by value.
Return Value
If this method succeeds, it returns an object containing the result of the public method call; otherwise, it returns an error message.
Using the IMethodExecuter Interface for the Call Method
The following code is an example of calling a public method named “Method1”, with a single string that is passed by reference (InOut):
object resultObj = ABSConnection.Call("Method1", // Name of public method new object [] { "Hello" }, // Array of objects specifying parameters new bool[] { true }); // Parameter modifiers determine pass by reference or value