Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/rx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Rx.NET/Tests.System.Reactive/NullErrorObservable.cs')
-rw-r--r--Rx.NET/Tests.System.Reactive/NullErrorObservable.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/Rx.NET/Tests.System.Reactive/NullErrorObservable.cs b/Rx.NET/Tests.System.Reactive/NullErrorObservable.cs
new file mode 100644
index 0000000..401d636
--- /dev/null
+++ b/Rx.NET/Tests.System.Reactive/NullErrorObservable.cs
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+using System.Reactive.Disposables;
+using System;
+
+namespace ReactiveTests
+{
+ public class NullErrorObservable<T> : IObservable<T>
+ {
+ public static NullErrorObservable<T> Instance = new NullErrorObservable<T>();
+
+ private NullErrorObservable()
+ {
+ }
+
+ public IDisposable Subscribe(IObserver<T> observer)
+ {
+ if (observer == null)
+ throw new ArgumentNullException("observer");
+
+ observer.OnError(null);
+ return Disposable.Empty;
+ }
+ }
+}