XppCompiler.execute(Object[]) Method

Definition

public:
 virtual System::Object ^ execute(cli::array <System::Object ^> ^ objArray1);
[Microsoft.Dynamics.Ax.Xpp.VarArgs]
public virtual object execute (object[] objArray1);
[<Microsoft.Dynamics.Ax.Xpp.VarArgs>]
abstract member execute : obj[] -> obj
override this.execute : obj[] -> obj
Public Overridable Function execute (objArray1 As Object()) As Object

Parameters

objArray1
Object[]

Returns

Attributes

Remarks

XppCompiler objects can compile code at run time. This presents a security risk. Therefore, execute method runs under Code Access Security. Calls to this method on the server require permission from the ExecutePermission class. Make sure that the user has development privileges by setting the security key to SysDevelopment on the control that calls this method.

The following example calls the execute method to compile and execute the supplied buffer.

void XppCompilerExecuteExample(Common _buf) 
{ 
    XppCompiler       xpp; 
    ExecutePermission perm; 
    perm = new ExecutePermission(); 
    if (perm == null) 
    { 
        return; 
    } 
    perm.assert(); 
    xpp = new XppCompiler(); 
    if (xpp != null) 
    { 
        xpp.execute(_buf); 
    } 
    CodeAccessPermission::revertAssert(); 
}

Applies to