public void Subscribe(ISignalObserver <T> observer) { var srcs = default(IObservableSource <T>[]); try { srcs = sources.ToArray(); } catch (Exception ex) { DisposableHelper.Error(observer, ex); return; } ObservableSourceAmbCoordinator <T> .Subscribe(observer, srcs); }
internal static void Subscribe(ISignalObserver <T> observer, IObservableSource <T>[] sources) { var n = sources.Length; if (n == 0) { DisposableHelper.Complete(observer); } else if (n == 1) { sources[0].Subscribe(observer); } else { var parent = new ObservableSourceAmbCoordinator <T>(observer, n); observer.OnSubscribe(parent); parent.Subscribe(sources); } }
public void Subscribe(ISignalObserver <T> observer) { ObservableSourceAmbCoordinator <T> .Subscribe(observer, sources); }
public InnerObserver(ISignalObserver <T> downstream, ObservableSourceAmbCoordinator <T> parent, int index) { this.downstream = downstream; this.parent = parent; this.index = index; }