public WorkBucket <TItem, TContext> AddBucket(string name, int nbWorker, TContext context)
        {
            WorkBucket <TItem, TContext> bucket = new WorkBucket <TItem, TContext>(context, name, Action, nbWorker);

            Buckets.Add(bucket);
            foreach (Worker <TItem, TContext> worker in bucket.Workers)
            {
                worker.PropertyChanged += WorkerOnPropertyChanged;
            }

            return(bucket);
        }
Exemplo n.º 2
0
 public Worker(string name, WorkBucket <TItem, TContext> bucket)
 {
     Name   = name;
     Bucket = bucket;
 }