TreeNode.treeNodeExport Method

Exports this node and its subtree from the Application Object Tree (AOT).

Syntax

public void treeNodeExport(str filename, [int flag])

Run On

Called

Parameters

  • filename
    Type: str
    The file name for the export file.
  • flag
    Type: int

Remarks

If an attacker can control input to this method, a security risk exists. Therefore, this method runs under Code Access Security. Calls to this method on the server require permission from the . Ensure that the user has development privileges by setting the security key to SysDevelopment on the control that calls this method.

Examples

This example uses the treeNodeExport method to export the ExampleClass class to an .xpo file.

void TreeNodeExample() 
{ 
    TreeNode treeNode; 
    TreeNode childNode; 
    FileIoPermission perm; 
  
    #define.ExportFile(@"c:\TreeNodeExportExampleClass.xpo") 
    #define.ExportMode("w") 
  
    perm = new FileIoPermission(#ExportFile, #ExportMode); 
    if (perm == null) 
    { 
        return; 
    } 
  
    perm.assert(); 
  
    treeNode = TreeNode::findNode(@"\Classes"); 
    if (treeNode != null) 
    { 
        childNode = treeNode.AOTfindChild(@"ExampleClass"); 
        // BP deviation documented. 
        childNode.treeNodeExport(#ExportFile); 
    } 
  
    CodeAccessPermission::revertAssert(); 
}

See Also

TreeNode Class

xInfo.importElement Method

TreeNode.AOTmakeXref Method

TreeNode.AOTrun Method

TreeNode.AOTsave Method

TreeNode.AOTrestore Method