/// <summary> /// Sends the event. /// </summary> /// <param name="engine"> The AD7Engine object that represents the DE. </param> /// <param name="exitCode"> The thread's exit code. </param> /// <param name="thread"> The AD7Thread object that represents the thread. </param> internal static void Send(AD7Engine engine, uint exitCode, AD7Thread thread) { var eventObject = new AD7ThreadDestroyEvent(exitCode); if (thread == null) { foreach (AD7Thread t in engine.thread) { engine.Callback.Send(eventObject, IID, t); } engine._currentThreadIndex = -1; } else { engine.Callback.Send(eventObject, IID, thread); } }
internal static void Send(AD7Engine engine, uint exitCode, AD7Thread thread) { var eventObject = new AD7ThreadDestroyEvent(exitCode); if (thread == null) { foreach (AD7Thread t in engine.thread) { engine.Callback.Send(eventObject, IID, t); } engine._currentThreadIndex = -1; } else { engine.Callback.Send(eventObject, IID, thread); } // engine.Callback.Send(eventObject, IID, null); }