public override void Execute() { foreach (var item in source) { BaseSubject <T> subject = (BaseSubject <T>)item; subject.Execute(); } }
public AmbSubjectArray(params IObservable <T>[] source) { this.source = source; Reactor reactor = new Reactor(); foreach (var item in source) { BaseSubject <T> subject = (BaseSubject <T>)item; AmbSubjectObject <T> obj = new AmbSubjectObject <T>(subject, this, reactor); } }
public AmbSubjectObject(BaseSubject <T> subject, BaseSubject <T> parentSubject, Reactor reactor) { this.reactor = reactor; this.parentSubject = parentSubject; var observer = new Observer <T>( value => InnerExecute(value), ex => { throw new Exception(ex.Message); }, () => { }); this.subject = subject; this.subject.ColdSubscribe(observer); }
public TimestampedSubject(IObservable <T> source) { BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( value => InnerExecute(value), ex => NotifyErrorObservers(ex), () => NotifyCompleteObservers()); this.subscriped = subject.ColdSubscribe(observer); }
public void Start(IObservable <T1> source) { BaseSubject <T1> subject = (BaseSubject <T1>)source; this.subject = subject; var observer = new Observer <T1>( value => InnerExecute(value), ex => NotifyErrorObservers(ex), () => { }); this.subscriped = subject.ColdSubscribe(observer); }
private void ErrorExecute(Exception exception) { BaseSubject <T> secondsubject = (BaseSubject <T>)secondsource; this.secondsubject = secondsubject; var observer = new Observer <T>( value => InnerExecute(value), ex => NotifyErrorObservers(exception), () => NotifyCompleteObservers()); this.subscriped = secondsubject.Subscribe(observer); }
public MinSubjectSubjectInt(IObservable <int> source) { this.source = source; BaseSubject <int> subject = (BaseSubject <int>)source; this.subject = subject; var observer = new Observer <int>( value => InnerExecute(value), ex => NotifyErrorObservers(ex), () => InnerComplete()); this.subscriped = subject.ColdSubscribe(observer); }
public FirstSubject(IObservable <T> source) { this.source = source; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( localvalue => InnerExecute(localvalue), ex => NotifyErrorObservers(ex), () => NotifyCompleteObservers()); this.subscriped = subject.Subscribe(observer); }
public ElementAtSubject(IObservable <T> source, int index) { this.source = source; this.index = index; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( value => InnerExecute(value), ex => NotifyErrorObservers(ex), () => NotifyCompleteObservers()); this.subscriped = subject.ColdSubscribe(observer); }
public LookupSubject(IObservable <T> source, Func <T, TKey> keySelector) { this.source = source; this.keySelector = keySelector; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( value => InnerExecute(value), ex => NotifyErrorObservers(ex), () => NotifyCompleteObservers()); this.subscriped = subject.ColdSubscribe(observer); }
public ScanSubject(IObservable <T> source, Func <T, T, T> accumulator) { this.source = source; this.accumulator = accumulator; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( value => InnerExecute(value), ex => NotifyErrorObservers(ex), () => NotifyCompleteObservers()); this.subscriped = subject.ColdSubscribe(observer); }
public WhereSubject(IObservable <T> source, Predicate <T> predicate) { this.source = source; this.predicate = predicate; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( value => InnerExecute(value), ex => NotifyErrorObservers(ex), () => NotifyCompleteObservers()); this.subscriped = subject.ColdSubscribe(observer); }
private ObserveOnSubject(IObservable <T> source) { base.Scheduler = new CurrentThreadScheduler(); this.source = source; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( value => InnerExecute(value), ex => NotifyErrorObservers(ex), () => NotifyCompleteObservers()); this.subscriped = subject.ColdSubscribe(observer); }
public AllSubject(IObservable <T> source, Func <T, bool> predicate) { this.source = source; this.predicate = predicate; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( value => InnerExecute(value), ex => NotifyErrorObservers(ex), () => { }); this.subscriped = subject.ColdSubscribe(observer); }
public DoSubject(IObservable <T> source, Action <T> action) { this.source = source; this.action = action; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( value => InnerExecute(value), ex => NotifyErrorObservers(ex), () => NotifyCompleteObservers()); this.subscriped = subject.ColdSubscribe(observer); }
public FinallySubject(IObservable <T> source, Action action) { this.source = source; this.action = action; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( value => InnerExecute(value), ex => InnerError(ex), () => InnerComplete()); this.subscriped = subject.ColdSubscribe(observer); }
public ContainsSubject(IObservable <T> source, T value) { this.source = source; this.value = value; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( localvalue => InnerExecute(localvalue), ex => NotifyErrorObservers(ex), () => InnerComplete()); this.subscriped = subject.ColdSubscribe(observer); }
public StartWithSubject(IObservable <T> source, T[] values) { this.source = source; this.values = values; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( value => InnerExecute(value), ex => NotifyErrorObservers(ex), () => NotifyCompleteObservers()); this.subscriped = subject.ColdSubscribe(observer); }
public GroupBySubSubject(IObservable <T> source, TKey key) { this.source = source; this.key = key; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( localvalue => InnerExecute(localvalue), ex => NotifyErrorObservers(ex), () => NotifyCompleteObservers()); this.subscriped = subject.ColdSubscribe(observer); }
public CatchSubject(IObservable <T> firstsource, IObservable <T> secondsource) { this.firstsource = firstsource; this.secondsource = secondsource; BaseSubject <T> firstsubject = (BaseSubject <T>)firstsource; this.firstsubject = firstsubject; var observer = new Observer <T>( value => InnerExecute(value), ex => ErrorExecute(ex), () => NotifyCompleteObservers()); this.subscriped = firstsubject.ColdSubscribe(observer); }
public SelectManySubject(IObservable <T> source, Func <T, IEnumerable <TResult> > selector) { this.source = source; this.selector = selector; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( value => InnerExecute(value), ex => NotifyErrorObservers(ex), () => NotifyCompleteObservers()); this.subscriped = subject.ColdSubscribe(observer); }
public SkipSubject(IObservable <T> source, int count) { this.source = source; this.count = count; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( localvalue => InnerExecute(localvalue), ex => NotifyErrorObservers(ex), () => NotifyCompleteObservers()); this.subscriped = subject.ColdSubscribe(observer); }
public TransformSubject(IObservable <T> source, Func <T, T> transform) { this.Scheduler = new CurrentThreadScheduler(); this.source = source; this.transform = transform; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( value => InnerExecute(value), ex => NotifyErrorObservers(ex), () => { OnCompleted(); }); this.subscriped = subject.ColdSubscribe(observer); }
public AggregateSubject(IObservable <T> source, Func <T, T, T> accumulator) { this.Scheduler = new CurrentThreadScheduler(); this.source = source; this.accumulator = accumulator; BaseSubject <T> subject = (BaseSubject <T>)source; this.subject = subject; var observer = new Observer <T>( value => InnerExecute(value), ex => NotifyErrorObservers(ex), () => { OnCompleted(); }); this.subscriped = subject.ColdSubscribe(observer); }
public ZipSubject(IObservable <TFirst> first, IEnumerable <TSecond> second, Func <TFirst, TSecond, TResult> resultSelector) { this.first = first; this.second = second; this.resultSelector = resultSelector; BaseSubject <TFirst> subject = (BaseSubject <TFirst>)first; this.subject = subject; var observer = new Observer <TFirst>( value => InnerExecute(value), ex => NotifyErrorObservers(ex), () => NotifyCompleteObservers()); this.subscriped = subject.ColdSubscribe(observer); }
public AmbSubject(IObservable <T> first, IObservable <T> second) { this.first = (BaseSubject <T>)first; this.second = (BaseSubject <T>)second; var firstobserver = new Observer <T>( value => InnerExecuteFirst(value), ex => NotifyErrorObservers(ex), () => NotifyCompleteObservers()); var secondobserver = new Observer <T>( value => InnerExecuteSecond(value), ex => NotifyErrorObservers(ex), () => NotifyCompleteObservers()); this.firstsubscriped = this.first.ColdSubscribe(firstobserver); this.secondsubscriped = this.second.ColdSubscribe(secondobserver); }
public DisposeObject(List <IObserver <T> > observers, BaseSubject <T> subject, IObserver <T> observer) { this.observers = observers; this.observer = observer; this.subject = subject; }