private void ExecuteHandler(HandlerType type, Object[] parameters) { String handler = GetHandlerClassName(type); if (!string.IsNullOrWhiteSpace(handler)) { try { string nSpace = string.Empty; Config.GetValueOf("AppMainNamespace", out nSpace); GXProcedure obj = null; try { obj = (GXProcedure)ClassLoader.FindInstance(string.Empty, nSpace, handler, null, null); } catch (Exception) { LogError("GXWebSocket - Could not create Procedure Instance: " + handler); return; } ClassLoader.Execute(obj, "execute", parameters); } catch (Exception e) { LogError("GXWebSocket - Handler failed executing action: " + handler); LogError(e.Message); } } }
void executePrivate( ) { /* GeneXus formulas */ /* Output device settings */ args = new Object[] {}; ClassLoader.Execute("wwpbaseobjects-secupdatefuncionalities", "GeneXus.Programs", "wwpbaseobjects.secupdatefuncionalities", new Object[] { context }, "execute", args); this.cleanup(); }
private void DynamicExecute(string funcName, object[] callParms) { if (!String.IsNullOrEmpty(parentAssembly)) { ClassLoader.Execute(parentAssembly, ns, funcName, new object[] { context }, "execute", callParms); } else { ClassLoader.Execute(Assembly.GetExecutingAssembly().FullName, ns, funcName, new object[] { context }, "execute", callParms); } }
void executePrivate( ) { /* GeneXus formulas */ /* Output device settings */ args = new Object[] { (long)AV2TanqueroBandaCPSUAB, (long)AV3TanqueroBandaTM, (long)AV4DWT, (SdtSdtResultado)AV5SdtResultado }; ClassLoader.Execute("acalculartanqueros", "GeneXus.Programs.acalculartanqueros", new Object[] { context }, "execute", args); if ((args != null) && (args.Length == 4)) { AV5SdtResultado = (SdtSdtResultado)(args[3]); } this.cleanup(); }
public void ExecuteBlock() { if (statusInfo.Status != ReorgBlockStatus.Pending) { return; } statusInfo.Status = ReorgBlockStatus.Executing; string reorgAssembly = "Reorganization"; GXReorganization o = (GXReorganization)(ClassLoader.FindInstance(reorgAssembly, appNamespace, "reorg", null, assembly)); try { o.initialize(); ClassLoader.Execute(o, blockName, blockParms); statusInfo.Status = ReorgBlockStatus.Ended; if (blockEnd != null) { blockEnd(blockName, 0); } o.context.CloseConnections(); } catch (Exception e) { statusInfo.Status = ReorgBlockStatus.Error; if (blockEnd != null) { blockEnd(blockName, 1); } Exception innerE = e.InnerException; if (innerE != null) { statusInfo.OtherStatusInfo = innerE.Message; Console.WriteLine("ERROR in " + blockName + " : " + innerE.Message + StringUtil.NewLine() + innerE.StackTrace); } else { statusInfo.OtherStatusInfo = e.Message; Console.WriteLine("ERROR in " + blockName + " : " + e.Message + StringUtil.NewLine() + e.StackTrace); } } }
private bool ExecuteHandler(HandlerType type, Object[] parameters) { String handler = GetHandlerClassName(type); if (!string.IsNullOrWhiteSpace(handler)) { try { string nSpace = string.Empty; Config.GetValueOf("AppMainNamespace", out nSpace); GXProcedure obj = null; try { obj = (GXProcedure)ClassLoader.FindInstance(Config.CommonAssemblyName, nSpace, handler, null, null); if (obj == null) { LogError($"GXWebSocket - Could not create Procedure Handler Class. Class Type '{nSpace}.{handler}' not found in Class Loader."); } } catch (Exception e) { LogError("GXWebSocket - Failed to intialize Procedure Handler Class: " + handler, e); } if (obj != null) { ClassLoader.Execute(obj, "execute", parameters); return(true); } } catch (Exception e) { LogError($"GXWebSocket - Procedure Handler Class Found '{handler}', but failed executing action 'execute.", e); } } return(false); }