public void Add(IUpdateWorker worker)
        {
            if (this.isStarted)
            {
                throw new Exception("Unable to add worker to the pool: pool is already started.");
            }

            worker.UpdateError += this.OnWorkerUpdateError;

            this.workers.Add(worker);
        }
Example #2
0
 public WorkerInfo(Func <IUpdateable, bool> predicate, IUpdateWorker worker)
 {
     this.Predicate = predicate;
     this.Worker    = worker;
 }
Example #3
0
        public void Add(Func <IUpdateable, bool> predicate, IUpdateWorker worker)
        {
            worker.UpdateError += this.OnWorkerUpdateError;

            this.workers.Add(new WorkerInfo(predicate, worker));
        }