Share via


XppCompiler.execute Method

Syntax

public anytype execute( )

Run On

Called

Parameters

  • Type: [T:]

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.

Examples

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(); 
}

See Also

Reference

XppCompiler Class