public void Execute <T>(params dynamic[] parameters) where T : Subtask { isRunning = true; taskThread = new Thread(() => { try { TaskCore.Begin(); TaskCore.Bind(container.Add); Result = TaskCore.Require <T>(parameters); } catch (Exception ex) { threadException = ex; } finally { TaskCore.End(); isRunning = false; } }); taskThread.Start(); }
public dynamic Execute <T>(params dynamic[] parameters) where T : Subtask { try { TaskCore.Begin(); TaskCore.Bind(container.Add); return(TaskCore.Require <T>(parameters)); } finally { TaskCore.End(); } }