Пример #1
0
        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();
        }
Пример #2
0
        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();
            }
        }