iRobo.Activity.InvokeMethod
Invoke Method activity is used to call a public method of a specified object or type.
Properties
- DisplayName - Activity header name.
- GenericTypeArguments - Specify generic types in collection to invoke generic methods.
- MethodName - Enter Method name. (Mandatory)
- Parameters - Method collection parameter.
- Result - Return value.
- RunAshynchoronasly - Run Method synchronously or not. Its input is True/False arguments.
- TargetObject - Object that contains non-static methods.
- TargetType - Specify method type.
Either TargetObject or TargetType property is required for Invoke Method Activity. |
Example on Using InvokeMethod Activity
To better understand Invoke Method Activity, let's build an automated process that trigger a method to add Table to Data Set.
- Open iRobo Studio, and then open a new Workflow.
- Create DataSet, DataTable Variables into Variable Table as shown in the image below.
- Drag two Assign Activity to the Sequence.
- Assign DataSet Variable to the first Assign Activity as: ds = new DataSet(), as shown in the image below.
- Assign DataTable Variable to the second Assign Activity as: dt = new System.Data.DataTable("New Table"), as shown in the image below.
- Set TargetType as: (null).
- Add ds.Tables as: TargetObject.
- Type MethodName.
- Drag MessageBox Activity to the Sequence, as shown in the image below.
- Type into Message Property ds.Tables(0).TableName.ToString().
- Click Save button from iRobo Studio Menu to save Workflow.
- Click Play button to start the automated process.
Created with the Personal Edition of HelpNDoc: Free Web Help generator