|
@@ -8,6 +8,20 @@ namespace System.Reactive.Linq.ObservableImpl
|
|
|
{
|
|
|
internal sealed class Never<TResult> : IObservable<TResult>
|
|
|
{
|
|
|
+ /// <summary>
|
|
|
+ /// The only instance for a TResult type: this source
|
|
|
+ /// is completely stateless and has a constant behavior.
|
|
|
+ /// </summary>
|
|
|
+ internal static readonly IObservable<TResult> Default = new Never<TResult>();
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// No need for instantiating this more than once per TResult.
|
|
|
+ /// </summary>
|
|
|
+ private Never()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
public IDisposable Subscribe(IObserver<TResult> observer)
|
|
|
{
|
|
|
if (observer == null)
|