ACR_Wealth.ACR_Wealth.ExecuteScript C# (CSharp) Method

ExecuteScript() public method

This routine is the main entry point symbol for the script. It is invoked when the packaged script is executed.
public ExecuteScript ( [ ObjectSelf, [ ScriptParameters, [ DefaultReturnCode ) : Int32
ObjectSelf [ Supplies the "OBJECT_SELF" object id of /// the object that the script is being executed over. This may be the /// invalid object id (Script.OBJECT_INVALID) if no object is /// associated with the execute script request.
ScriptParameters [ Supplies the parameter values for /// the script. If the type deriving from IGeneratedScriptProgram /// declares a ScriptParameterTypes public field, then parameters may /// be passed in via this array (in which case the parameter types /// have already been converted and validated). Otherwise, no /// arguments are provided.
DefaultReturnCode [ Supplies the requested default /// return code to use if the script is a "main"-style script that /// would not conventionally return a value.
return System.Int32
        public Int32 ExecuteScript([In] UInt32 ObjectSelf, [In] object[] ScriptParameters, [In] Int32 DefaultReturnCode)
        {
            UInt32 OldOBJECT_SELF = ObjectSelf;
            int ReturnCode;

            try
            {
                OBJECT_SELF = ObjectSelf;
                ReturnCode = ScriptMain(ScriptParameters, DefaultReturnCode);
            }
            finally
            {
                OBJECT_SELF = OldOBJECT_SELF;
            }

            return ReturnCode;
        }