Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Omega methods #387

Merged
merged 2 commits into from
Apr 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ public AsObservable(IObservable<TSource> source)
_source = source;
}

public IObservable<TSource> Omega()
{
return this;
}

public IObservable<TSource> Eval()
{
return _source;
Expand Down
2 changes: 1 addition & 1 deletion Rx.NET/Source/src/System.Reactive/Linq/Observable/Cast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ public IgnoreElements(IObservable<TSource> source)
_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);
Expand Down
4 changes: 2 additions & 2 deletions Rx.NET/Source/src/System.Reactive/Linq/Observable/Skip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public Skip(IObservable<TSource> source, TimeSpan duration, IScheduler scheduler
_scheduler = scheduler;
}

public IObservable<TSource> Omega(int count)
public IObservable<TSource> Combine(int count)
{
//
// Sum semantics:
Expand All @@ -39,7 +39,7 @@ public IObservable<TSource> Omega(int count)
return new Skip<TSource>(_source, _count + count);
}

public IObservable<TSource> Omega(TimeSpan duration)
public IObservable<TSource> Combine(TimeSpan duration)
{
//
// Maximum semantics:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public SkipUntil(IObservable<TSource> source, DateTimeOffset startTime, ISchedul
_scheduler = scheduler;
}

public IObservable<TSource> Omega(DateTimeOffset startTime)
public IObservable<TSource> Combine(DateTimeOffset startTime)
{
//
// Maximum semantics:
Expand Down
4 changes: 2 additions & 2 deletions Rx.NET/Source/src/System.Reactive/Linq/Observable/Take.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public Take(IObservable<TSource> source, TimeSpan duration, IScheduler scheduler
_scheduler = scheduler;
}

public IObservable<TSource> Omega(int count)
public IObservable<TSource> Combine(int count)
{
//
// Minimum semantics:
Expand All @@ -42,7 +42,7 @@ public IObservable<TSource> Omega(int count)
return new Take<TSource>(_source, count);
}

public IObservable<TSource> Omega(TimeSpan duration)
public IObservable<TSource> Combine(TimeSpan duration)
{
//
// Minimum semantics:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public TakeUntil(IObservable<TSource> source, DateTimeOffset endTime, IScheduler
_scheduler = scheduler;
}

public IObservable<TSource> Omega(DateTimeOffset endTime)
public IObservable<TSource> Combine(DateTimeOffset endTime)
{
//
// Minimum semantics:
Expand Down
2 changes: 1 addition & 1 deletion Rx.NET/Source/src/System.Reactive/Linq/Observable/Where.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public Where(IObservable<TSource> source, Func<TSource, int, bool> predicate)
_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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public virtual IObservable<TSource> AsObservable<TSource>(IObservable<TSource> s
{
var asObservable = source as AsObservable<TSource>;
if (asObservable != null)
return asObservable.Omega();
return asObservable;

return new AsObservable<TSource>(source);
}
Expand Down Expand Up @@ -137,7 +137,7 @@ public virtual IObservable<TSource> IgnoreElements<TSource>(IObservable<TSource>
{
var ignoreElements = source as IgnoreElements<TSource>;
if (ignoreElements != null)
return ignoreElements.Omega();
return ignoreElements;

return new IgnoreElements<TSource>(source);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public virtual IObservable<TSource> Skip<TSource>(IObservable<TSource> source, i
{
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);
}
Expand Down Expand Up @@ -387,7 +387,7 @@ private static IObservable<TSource> Take_<TSource>(IObservable<TSource> source,
{
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);
}
Expand All @@ -414,7 +414,7 @@ public virtual IObservable<TSource> Where<TSource>(IObservable<TSource> source,
{
var where = source as Where<TSource>;
if (where != null)
return where.Omega(predicate);
return where.Combine(predicate);

return new Where<TSource>(source, predicate);
}
Expand Down
8 changes: 4 additions & 4 deletions Rx.NET/Source/src/System.Reactive/Linq/QueryLanguage.Time.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ private static IObservable<TSource> Skip_<TSource>(IObservable<TSource> source,
{
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);
}
Expand Down Expand Up @@ -295,7 +295,7 @@ private static IObservable<TSource> SkipUntil_<TSource>(IObservable<TSource> sou
{
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);
}
Expand All @@ -318,7 +318,7 @@ private static IObservable<TSource> Take_<TSource>(IObservable<TSource> source,
{
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);
}
Expand Down Expand Up @@ -380,7 +380,7 @@ private static IObservable<TSource> TakeUntil_<TSource>(IObservable<TSource> sou
{
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);
}
Expand Down