protected virtual void Dispose(bool disposing) { if (!disposing) { return; } if (_producer == null) { return; } _producer.Dispose(); _producer = null; }
public static ObservingProducer <T> Consumes <T>(this ObservingProducer <T> producer, IProducerConsumerCollection <T> collection) { producer.Attach(new CollectionConsumer <T>(collection)); return(producer); }
public static ObservingProducer <T> Consumes <T>(this ObservingProducer <T> producer, IEnumerable <Consumes <T> > consumers) { producer.Attach(new CompositeConsumer <T>(consumers)); return(producer); }
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); }
public static ObservingProducer <T> Consumes <T>(this ObservingProducer <T> producer, Consumes <T> consumer) { producer.Attach(consumer); return(producer); }
public DelegatingObservingProducer(Func <CancellationToken, T> @delegate) { _producer = new ObservingProducer <T>(); _producer.Produces(@delegate.AsContinuousObservable()); }