protected virtual void Dispose(bool disposing)
 {
     if (!disposing)
     {
         return;
     }
     if (Background == null)
     {
         return;
     }
     Background.Dispose();
     Background = null;
 }
 protected UsesBackgroundProducer()
 {
     Background = new BackgroundProducer <T>();
 }
Exemplo n.º 3
0
 public static BackgroundProducer <T> Consumes <T>(this BackgroundProducer <T> producer, IProducerConsumerCollection <T> collection)
 {
     producer.Attach(new CollectionConsumer <T>(collection));
     return(producer);
 }
Exemplo n.º 4
0
 public static BackgroundProducer <T> Consumes <T>(this BackgroundProducer <T> producer, IEnumerable <Consumes <T> > consumers)
 {
     producer.Attach(new CompositeConsumer <T>(consumers));
     return(producer);
 }
Exemplo n.º 5
0
 public static BackgroundProducer <T> Consumes <T>(this BackgroundProducer <T> producer, Action <T> @delegate, Consumes <T> forwardTo)
 {
     producer.Attach(new DelegatingConsumer <T>(@delegate, forwardTo));
     return(producer);
 }
Exemplo n.º 6
0
 public static BackgroundProducer <T> Consumes <T>(this BackgroundProducer <T> producer, Consumes <T> consumer)
 {
     producer.Attach(consumer);
     return(producer);
 }