/// <summary> /// Dispatch the event (in a script context). /// </summary> /// <param name="Script">Supplies the script object.</param> /// <param name="Database">Supplies the database connection.</param> public void DispatchEvent(ACR_ServerCommunicator Script, ALFA.Database Database) { int SourceServerId = (SourceServer != null) ? SourceServer.ServerId : 0; Script.WriteTimestampedLogEntry(String.Format("RunScriptEvent.DispatchEvent: Executing script {0} ({1}) on request from {2}.", ScriptName, ScriptArgument, SourceServerId)); Script.AddScriptParameterInt(SourceServerId); Script.AddScriptParameterString(ScriptArgument); Script.ExecuteScriptEnhanced(ScriptName, Script.GetModule(), CLRScriptBase.TRUE); Database.ACR_IncrementStatistic("RUN_REMOTE_SCRIPT"); }
/// <summary> /// Dispatch the event (in a script context). /// </summary> /// <param name="Script">Supplies the script object.</param> /// <param name="Database">Supplies the database connection.</param> public void DispatchEvent(ACR_ServerCommunicator Script, ALFA.Database Database) { int SourceServerId = (SourceServer != null) ? SourceServer.ServerId : 0; Script.WriteTimestampedLogEntry(String.Format("RunScriptEvent.DispatchEvent: Executing script {0} ({1}) on request from {2}.", ScriptName, ScriptArgument, SourceServerId)); Script.ClearScriptParams(); Script.AddScriptParameterInt(SourceServerId); Script.AddScriptParameterString(ScriptArgument); Script.ExecuteScriptEnhanced(ScriptName, Script.GetModule(), CLRScriptBase.TRUE); Database.ACR_IncrementStatistic("RUN_REMOTE_SCRIPT"); }