Closed clement-brodu closed 1 year ago
BLOCK-LEVEL ON ERROR UNDO, THROW. USING System.Environment FROM ASSEMBLY. DEFINE VARIABLE wAssembly AS System.Reflection.Assembly NO-UNDO. DEFINE VARIABLE destFile AS CHARACTER NO-UNDO. DEFINE VARIABLE pctTools AS CHARACTER NO-UNDO. DEFINE VARIABLE currentDir AS CHARACTER NO-UNDO. DEFINE VARIABLE vAsmCatalog AS Progress.Lang.Object NO-UNDO. ASSIGN destFile = DYNAMIC-FUNCTION('getParameter' IN SOURCE-PROCEDURE, 'destFile'). currentDir = Environment:CurrentDirectory. destFile = System.IO.Path:Combine(currentDir, destFile). pctTools = "C:\Somewhere\PCTTools.dll". MESSAGE "PARAM :" SESSION:STARTUP-PARAMETERS. MESSAGE "destFile :" destFile. MESSAGE "pctTools :" pctTools. wAssembly = System.Reflection.Assembly:LoadFrom(pctTools). vAsmCatalog = wAssembly:CreateInstance("PCTTools.AssemblyCatalog"). //DYNAMIC-INVOKE (vAsmCatalog, "GenerateDocumentationFromAssembly", wAssembly). DYNAMIC-INVOKE (vAsmCatalog,"GenerateDocumentationFromAppDomain"). DYNAMIC-INVOKE (vAsmCatalog, "ToJsonFile", destFile). RETURN '0'.