OperationTypeInfo

Class Overview
Used to specify parameters for a FriendlyOperation when there is a need to resolve overloads or call an operation on a parent class.
Please refer to samples.



public OperationTypeInfo(string target, params string[] arguments)
Description
Constructor.

Parameters
target
The full class name of the target type for the target operation.
arguments
The full class names of the the target operation's parameters.



public string Target{ get; }
Description
Returns the full class name of the target type for the target operation.



public object[] Arguments { get; }
          Description
Returns an array of the full class names of the target operation's parameters.



Sample
//There is the following class in application and this sample operates it.
class Parent
{
    int data;
}
 
class Child
{
    // Same variable name as the parent class
    int data;
    // Overloaded methods
    public void Test(Form form)
    {
        //...Process
    }    
    public void Test(Control control)
    {
        //...Process
    }
}

// Test class generation
AppVar child = app.Dim(new NewInfo<Child>());

// Setting value to data variable of parent class
child["data", new OperationTypeInfo(typeof(Parent).FullName, typeof(int).FullName)](100);

//Normally an overload can be resolved based on the arguments.
AppVar form = app.Dim(new NewInfo<Form>());
child["Test"](form);

//But it can't guess from the arguments if null is specified, so OperationTypeInfo is used.
child["Test", new OperationTypeInfo(typeof(Parent).FullName, typeof(Form).FullName)](null);


JR