Exemplo n.º 1
0
 /// <summary>
 /// Initializes the task manager with the property values specified in the configuration file.
 /// </summary>
 /// <param name="node">Node</param>
 public void Initialize(XmlNode node)
 {
     this._taskThreads.Clear();
     foreach (XmlNode node1 in node.ChildNodes)
     {
         if (node1.Name.ToLower() == "thread")
         {
             var taskThread = new TaskThread(node1);
             this._taskThreads.Add(taskThread);
             foreach (XmlNode node2 in node1.ChildNodes)
             {
                 if (node2.Name.ToLower() == "task")
                 {
                     var attribute = node2.Attributes["type"];
                     var taskType = Type.GetType(attribute.Value);
                     if (taskType != null)
                     {
                         var task = new Task(taskType, node2);
                         taskThread.AddTask(task);
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
 internal void ProcessException(Task task, Exception exception)
 {
     try
     {
         //process exception code here
     }
     catch
     {
     }
 }