Beispiel #1
0
            public override void OnNext(T value)
            {
                bool flag = false;

                try
                {
                    flag = parent.predicate(value);
                }
                catch (Exception error)
                {
                    try
                    {
                        observer.OnError(error);
                    }
                    finally
                    {
                        Dispose();
                    }
                    return;
                }
                if (flag)
                {
                    observer.OnNext(value);
                }
            }
Beispiel #2
0
            public override void OnNext(T value)
            {
                var isPassed = false;

                try {
                    isPassed = parent.predicate(value);
                } catch (Exception ex) {
                    try { observer.OnError(ex); } finally { Dispose(); }

                    return;
                }

                if (isPassed)
                {
                    observer.OnNext(value);
                }
            }