1234567891011121314151617181920212223242526272829303132 |
- using System;
- namespace UniRx.Operators
- {
- internal class NeverObservable<T> : OperatorObservableBase<T>
- {
- public NeverObservable()
- : base(false)
- {
- }
- protected override IDisposable SubscribeCore(IObserver<T> observer, IDisposable cancel)
- {
- return Disposable.Empty;
- }
- }
- internal class ImmutableNeverObservable<T> : IObservable<T>, IOptimizedObservable<T>
- {
- internal static ImmutableNeverObservable<T> Instance = new ImmutableNeverObservable<T>();
- public bool IsRequiredSubscribeOnCurrentThread()
- {
- return false;
- }
- public IDisposable Subscribe(IObserver<T> observer)
- {
- return Disposable.Empty;
- }
- }
- }
|