//#pragma unsafe public override object CallPrologFast(object[] paramz) { //lock (oneEvtHandlerAtATime) { try { string module = Key.Module ?? "user"; PrologEvents++; if (!knownDefined && !PrologCLR.IsDefined(module, Key.Name, PrologArity)) { //PrologCLR.Warn("Undefined Event Handler {0}:{1}/{2}", module, Key.Name, PrologArity); return(null); } knownDefined = true; return(PrologCLR.CallProlog(this, module, Key.Name, PrologArity, Key.Origin, paramz, ReturnType, true)); } catch (AccessViolationException e) { PrologCLR.Warn("CallProlog: {0} ex: {1}", this, e); return(null); } catch (Exception e) { PrologCLR.Warn("CallProlog: {0} ex: {1}", this, e); return(null); } } }
//#pragma unsafe public override object CallPrologFast(object[] paramz) { //lock (oneEvtHandlerAtATime) { try { object arg1 = //Key.Origin; //makes sense for UseCallN this; PrologEvents++; if (UseCallN) { return(PrologCLR.CallProlog(this, Key.Module, "call", PrologArity, arg1, paramz, ReturnType, false)); } string module = Key.Module ?? "user"; PrologEvents++; if (!knownDefined && !PrologCLR.IsDefined(module, Key.Name, PrologArity)) { PrologCLR.Warn("Undefined Delegate Handler {0}:{1}/{2}", module, Key.Name, PrologArity); return(null); } knownDefined = true; return(PrologCLR.CallProlog(this, module, Key.Name, PrologArity, arg1, paramz, ReturnType, false)); } catch (AccessViolationException e) { PrologCLR.Warn("CallProlog: {0} ex: {1}", this, e); return(null); } catch (Exception e) { PrologCLR.Warn("CallProlog: {0} ex: {1}", this, e); return(null); } } }