Beispiel #1
0
        public void Enqueue(ExecutableElement element)
        {
            if (!_success)
            {
                element.Cancel();
                return;
            }

            lock (_elementsSyncRoot)
            {
                _elements.Enqueue(element);
            }
            element.InternalThread = this;
            _wakeUpEvent.Set();
        }
Beispiel #2
0
 public void AddDependency(ExecutableElement dependency)
 {
     if (dependency == null)
     {
         throw new ArgumentNullException("dependency");
     }
     lock (_dependenciesSyncRoot)
     {
         _dependencies.Enqueue(dependency);
     }
 }
Beispiel #3
0
 internal void EndExecute(ExecutableElement element)
 {
     Configuration configuration = element as Configuration;
     if (configuration != null)
     {
         foreach (Logger logger in _loggers)
         {
             logger.EndConfiguration(configuration);
         }
     }
     else
     {
         Target target = element as Target;
         if (target != null)
         {
             foreach (Logger logger in _loggers)
             {
                 logger.EndTarget(target);
             }
         }
         else
         {
             Task task = element as Task;
             if (task != null)
             {
                 foreach (Logger logger in _loggers)
                 {
                     logger.EndTask(task);
                 }
             }
         }
     }
 }