Exemple #1
0
 public bool Execute()
 {
     m_taskStatus = true;
     m_timeBomb.Start(m_timeoutMillis);
     try
     {
         if (m_pushTaskNameDelegate != null)
         {
             m_clientGroup.CallFn(m_pushTaskNameDelegate,
                                  new object[] { m_timeBomb.TaskName });
         }
         if (m_taskStartedHandler != null || m_taskDoneHandler != null)
         {
             m_clientGroup.AddTaskHandlers(HandleTaskStarted, HandleTaskDone);
         }
         FwkReadData read = new FwkReadData();
         read.PushTaskName(Name);
         string appDomain = read.GetStringValue("appdomain");
         if (appDomain != null && appDomain.Length > 0)
         {
             m_clientGroup.CallFn(m_delegate, new object[] { Util.AppDomainPrefix
                                                             + appDomain });
         }
         else
         {
             m_clientGroup.CallFn(m_delegate, null);
         }
         if (m_taskStartedHandler != null || m_taskDoneHandler != null)
         {
             m_clientGroup.RemoveTaskHandlers(HandleTaskStarted, HandleTaskDone);
         }
     }
     finally
     {
         m_timeBomb.Diffuse();
     }
     return(m_taskStatus);
 }