Following job illustrates how to export/backup all AOT Classes object.
void ExportTreeNodeExample()
{
TreeNode treeNode;
FileIoPermission perm;
#define.ExportFile(@"D:\AOTclasses.xpo")
#define.ExportMode("w")
;
perm = new FileIoPermission(#ExportFile, #ExportMode);
if (perm == null)
{
return;
}
perm.assert();
treeNode = TreeNode::findNode(@"\Classes");
if (treeNode != null)
{
// BP deviation documented.
treeNode.treeNodeExport(#ExportFile);
}
CodeAccessPermission::revertAssert();
}
No comments:
Post a Comment