IBaseMethod.Invoke

Syntax

Invoke([Value: Variant = Null]);

Parameters

Value. Value sent to method.

Description

The Invoke method executes custom method.

Comments

Invoke provides a possibility to execute custom method, but do not allow to get execution result. It can be used to check custom method efficiency. The executable custom method can contain maximum one parameter.

Example

Executing the example the repository must contain custom methods. The first custom method must not contain parameters in its signature.

Add links to the Fore and Metabase system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    SharedParams: ISharedParams;
    Method: IForeMethod;
Begin
    Mb := MetabaseClass.Active;
    SharedParams := Mb.SpecialObject(MetabaseSpecialObject.SharedParams).Bind 
As ISharedParams;
    Method := SharedParams.Methods.FindByKey(
16);
    
Try     
        Method.Invoke;
    
Except On e: Exception Do
        Debug.WriteLine(
"Error: " + e.Message);
    
End Try;
End Sub UserProc;

On executing the example the custom method execution will be checked. If errors occur while execution, text of error will be displayed in the development environment console.

See also:

IBaseMethod