コード例 #1
0
        public Task getTask(string taskName)
        {
            Task serviceTask = new Task();

            if (System.Threading.Monitor.TryEnter(obj3, 10000))
            {
                try
                {
                    serviceTask.TaskName    = TaskControl.getTask(taskName).taskName;
                    serviceTask.Status      = TaskControl.getTask(taskName).status;
                    serviceTask.Description = TaskControl.getTask(taskName).description;
                }
                catch (NullReferenceException)
                {
                }
                finally
                {
                    System.Threading.Monitor.Exit(obj3);
                }
            }
            return(serviceTask);
        }