XppCompiler.execute(Object[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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();
}