コード例 #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (!disposing)
     {
         return;
     }
     if (_producer == null)
     {
         return;
     }
     _producer.Dispose();
     _producer = null;
 }
コード例 #2
0
 public static ObservingProducer <T> Consumes <T>(this ObservingProducer <T> producer, IProducerConsumerCollection <T> collection)
 {
     producer.Attach(new CollectionConsumer <T>(collection));
     return(producer);
 }
コード例 #3
0
 public static ObservingProducer <T> Consumes <T>(this ObservingProducer <T> producer, IEnumerable <Consumes <T> > consumers)
 {
     producer.Attach(new CompositeConsumer <T>(consumers));
     return(producer);
 }
コード例 #4
0
 public static ObservingProducer <T> Consumes <T>(this ObservingProducer <T> producer, Action <T> @delegate, Consumes <T> forwardTo)
 {
     producer.Attach(new DelegatingConsumer <T>(@delegate, forwardTo));
     return(producer);
 }
コード例 #5
0
 public static ObservingProducer <T> Consumes <T>(this ObservingProducer <T> producer, Consumes <T> consumer)
 {
     producer.Attach(consumer);
     return(producer);
 }
コード例 #6
0
 public DelegatingObservingProducer(Func <CancellationToken, T> @delegate)
 {
     _producer = new ObservingProducer <T>();
     _producer.Produces(@delegate.AsContinuousObservable());
 }