Ejemplo n.º 1
0
        public List <Task> getTasks()
        {
            List <Task> tsk = new List <Task>();

            if (System.Threading.Monitor.TryEnter(obj4, 10000))
            {
                try
                {
                    List <HealthCareModel.Object_Models.Task> returnList = TaskControl.getTasks();

                    if (returnList.Count != 0)
                    {
                        foreach (HealthCareModel.Object_Models.Task tskHost in returnList)
                        {
                            Task serviceTask = new Task();

                            serviceTask.TaskName    = tskHost.taskName;
                            serviceTask.Status      = tskHost.status;
                            serviceTask.Description = tskHost.description;

                            tsk.Add(serviceTask);
                        }
                    }
                }
                catch (NullReferenceException)
                {
                }
                finally
                {
                    System.Threading.Monitor.Exit(obj4);
                }
            }

            return(tsk);
        }