Răsfoiți Sursa

Renaming Omega operator fusion methods to Combine.

Bart De Smet 8 ani în urmă
părinte
comite
7d0f0c6b6c

+ 0 - 5
Rx.NET/Source/src/System.Reactive/Linq/Observable/AsObservable.cs

@@ -13,11 +13,6 @@ namespace System.Reactive.Linq.ObservableImpl
             _source = source;
         }
 
-        public IObservable<TSource> Omega()
-        {
-            return this;
-        }
-
         public IObservable<TSource> Eval()
         {
             return _source;

+ 1 - 1
Rx.NET/Source/src/System.Reactive/Linq/Observable/Cast.cs

@@ -4,7 +4,7 @@
 
 namespace System.Reactive.Linq.ObservableImpl
 {
-    internal sealed class Cast<TSource, TResult> : Producer<TResult> /* Could optimize further by deriving from Select<TResult> and providing Omega<TResult2>. We're not doing this (yet) for debuggability. */
+    internal sealed class Cast<TSource, TResult> : Producer<TResult> /* Could optimize further by deriving from Select<TResult> and providing Combine<TResult2>. We're not doing this (yet) for debuggability. */
     {
         private readonly IObservable<TSource> _source;
 

+ 0 - 5
Rx.NET/Source/src/System.Reactive/Linq/Observable/IgnoreElements.cs

@@ -13,11 +13,6 @@ namespace System.Reactive.Linq.ObservableImpl
             _source = source;
         }
 
-        public IObservable<TSource> Omega()
-        {
-            return this;
-        }
-
         protected override IDisposable Run(IObserver<TSource> observer, IDisposable cancel, Action<IDisposable> setSink)
         {
             var sink = new _(observer, cancel);

+ 2 - 2
Rx.NET/Source/src/System.Reactive/Linq/Observable/Skip.cs

@@ -27,7 +27,7 @@ namespace System.Reactive.Linq.ObservableImpl
             _scheduler = scheduler;
         }
 
-        public IObservable<TSource> Omega(int count)
+        public IObservable<TSource> Combine(int count)
         {
             //
             // Sum semantics:
@@ -39,7 +39,7 @@ namespace System.Reactive.Linq.ObservableImpl
             return new Skip<TSource>(_source, _count + count);
         }
 
-        public IObservable<TSource> Omega(TimeSpan duration)
+        public IObservable<TSource> Combine(TimeSpan duration)
         {
             //
             // Maximum semantics:

+ 1 - 1
Rx.NET/Source/src/System.Reactive/Linq/Observable/SkipUntil.cs

@@ -139,7 +139,7 @@ namespace System.Reactive.Linq.ObservableImpl
             _scheduler = scheduler;
         }
 
-        public IObservable<TSource> Omega(DateTimeOffset startTime)
+        public IObservable<TSource> Combine(DateTimeOffset startTime)
         {
             //
             // Maximum semantics:

+ 2 - 2
Rx.NET/Source/src/System.Reactive/Linq/Observable/Take.cs

@@ -27,7 +27,7 @@ namespace System.Reactive.Linq.ObservableImpl
             _scheduler = scheduler;
         }
 
-        public IObservable<TSource> Omega(int count)
+        public IObservable<TSource> Combine(int count)
         {
             //
             // Minimum semantics:
@@ -42,7 +42,7 @@ namespace System.Reactive.Linq.ObservableImpl
                 return new Take<TSource>(_source, count);
         }
 
-        public IObservable<TSource> Omega(TimeSpan duration)
+        public IObservable<TSource> Combine(TimeSpan duration)
         {
             //
             // Minimum semantics:

+ 1 - 1
Rx.NET/Source/src/System.Reactive/Linq/Observable/TakeUntil.cs

@@ -172,7 +172,7 @@ namespace System.Reactive.Linq.ObservableImpl
             _scheduler = scheduler;
         }
 
-        public IObservable<TSource> Omega(DateTimeOffset endTime)
+        public IObservable<TSource> Combine(DateTimeOffset endTime)
         {
             //
             // Minimum semantics:

+ 1 - 1
Rx.NET/Source/src/System.Reactive/Linq/Observable/Where.cs

@@ -22,7 +22,7 @@ namespace System.Reactive.Linq.ObservableImpl
             _predicateI = predicate;
         }
 
-        public IObservable<TSource> Omega(Func<TSource, bool> predicate)
+        public IObservable<TSource> Combine(Func<TSource, bool> predicate)
         {
             if (_predicate != null)
                 return new Where<TSource>(_source, x => _predicate(x) && predicate(x));

+ 2 - 2
Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Single.cs

@@ -20,7 +20,7 @@ namespace System.Reactive.Linq
         {
             var asObservable = source as AsObservable<TSource>;
             if (asObservable != null)
-                return asObservable.Omega();
+                return asObservable;
 
             return new AsObservable<TSource>(source);
         }
@@ -137,7 +137,7 @@ namespace System.Reactive.Linq
         {
             var ignoreElements = source as IgnoreElements<TSource>;
             if (ignoreElements != null)
-                return ignoreElements.Omega();
+                return ignoreElements;
 
             return new IgnoreElements<TSource>(source);
         }

+ 3 - 3
Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.StandardSequenceOperators.cs

@@ -344,7 +344,7 @@ namespace System.Reactive.Linq
         {
             var skip = source as Skip<TSource>;
             if (skip != null && skip._scheduler == null)
-                return skip.Omega(count);
+                return skip.Combine(count);
 
             return new Skip<TSource>(source, count);
         }
@@ -387,7 +387,7 @@ namespace System.Reactive.Linq
         {
             var take = source as Take<TSource>;
             if (take != null && take._scheduler == null)
-                return take.Omega(count);
+                return take.Combine(count);
 
             return new Take<TSource>(source, count);
         }
@@ -414,7 +414,7 @@ namespace System.Reactive.Linq
         {
             var where = source as Where<TSource>;
             if (where != null)
-                return where.Omega(predicate);
+                return where.Combine(predicate);
 
             return new Where<TSource>(source, predicate);
         }

+ 4 - 4
Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Time.cs

@@ -253,7 +253,7 @@ namespace System.Reactive.Linq
         {
             var skip = source as Skip<TSource>;
             if (skip != null && skip._scheduler == scheduler)
-                return skip.Omega(duration);
+                return skip.Combine(duration);
 
             return new Skip<TSource>(source, duration, scheduler);
         }
@@ -295,7 +295,7 @@ namespace System.Reactive.Linq
         {
             var skipUntil = source as SkipUntil<TSource>;
             if (skipUntil != null && skipUntil._scheduler == scheduler)
-                return skipUntil.Omega(startTime);
+                return skipUntil.Combine(startTime);
 
             return new SkipUntil<TSource>(source, startTime, scheduler);
         }
@@ -318,7 +318,7 @@ namespace System.Reactive.Linq
         {
             var take = source as Take<TSource>;
             if (take != null && take._scheduler == scheduler)
-                return take.Omega(duration);
+                return take.Combine(duration);
 
             return new Take<TSource>(source, duration, scheduler);
         }
@@ -380,7 +380,7 @@ namespace System.Reactive.Linq
         {
             var takeUntil = source as TakeUntil<TSource>;
             if (takeUntil != null && takeUntil._scheduler == scheduler)
-                return takeUntil.Omega(endTime);
+                return takeUntil.Combine(endTime);
 
             return new TakeUntil<TSource>(source, endTime, scheduler);
         }