Esempio n. 1
0
        public void Subscribe(ISingleObserver <R> observer)
        {
            var srcs = sources;
            var n    = srcs.Length;

            SingleZipCoordinator <T, R> .Run(srcs, n, observer, mapper, delayErrors);
        }
Esempio n. 2
0
        public void Subscribe(ISingleObserver <R> observer)
        {
            var n    = 0;
            var srcs = sources;

            var a = new ISingleSource <T> [8];

            try
            {
                foreach (var m in srcs)
                {
                    if (n == a.Length)
                    {
                        var b = new ISingleSource <T> [n + (n >> 2)];
                        Array.Copy(a, 0, b, 0, n);
                        a = b;
                    }
                    a[n++] = m;
                }
            }
            catch (Exception ex)
            {
                DisposableHelper.Error(observer, ex);
                return;
            }

            SingleZipCoordinator <T, R> .Run(a, n, observer, mapper, delayErrors);
        }