Looks like the Rx team have been super busy. After our Christmas release, we have another massive build to try out.
Some key features:
- Publish, Prune and Replay have been reverted to their previous signatures.
- Expand operator that recursively expands an initial observable sequence using a selector function.
- A set of FastSubjects!
Full Release notes:
- Added generic variance annotations on ISubject<in T1, out T2> and IObserver<in TValue, out TResult>.
- Enabling generic variance annotations for Silverlight 4 binaries.
- No longer installing Silverlight assemblies to the GAC; fixes build issues with Expression Blend.
- Made Unit, TimeStamped<T>, TimeInterval<T>, Notification<T> serializable.
- Fixes to System.Linq.Async’s Single and SingleOrDefault operators.
· Scheduler improvements:
- ControlScheduler and NewThreadScheduler now correctly use relative time.
- CurrentThreadScheduler, EventLoopScheduler, NewThreadScheduler and VirtualScheduler now normalize time properly.
- ImmediateScheduler, CurrentThreadScheduler and NewThreadScheduler no longer cause a thread sleep if the specified TimeSpan is zero.
- DispatcherScheduler, ThreadPoolScheduler and SynchronizationContextScheduler avoid using a timer if a scheduled action’s specified TimeSpan is zero.
- CurrentThreadScheduler on Windows Phone 7 no longer depends on ThreadStaticAttribute which is not implemented on Windows Phone 7.
· Changes to observable operators:
- Multicast, Publish, Prune and Replay binding operators:
- Changed return type of Multicast to IConnectableObservable<T>.
- Changed Multicast overload with an observable sequence selector function to take in a subject selector function, allowing deferred construction of the subject being used.
- Bringing back Publish, Prune and Replay operators, each of them calling into Multicast to fix the subject parameterization ([Behavior]Subject, AsyncSubject and ReplaySubject respectively).
- Removed Publish overload that simply returns an IObservable<T>.
- Buffering and windowing operators:
- BufferWithTime, BufferWithCount and BufferWithTimeOrCount now return IObservable<IList<T>> as they used to do before.
- Added WindowWithTime, WindowWithCount and WindowWithTimeOrCount which return IObservable<IObservable<T>>, as special cases of the general purpose Window operator.
- Fixed issue with duplicate or missing values due to timer errors.
- Added ToList, ToArray, ToDictionary and ToLookup aggregation standard query operators, returning an observable sequence with the (single) aggregated value.
- Added SequenceEqual operator which checks that the values in a stream are equal (but not the timing).
- Added Expand operator that recursively expands an initial observable sequence using a selector function.
- Added Concat overload that takes an observable sequence of observable sequences and produces a single observable sequence which exhausts each inner observable sequence before subscribing to the next observable sequence.
- Added Merge overload that allows specifying the maximum number of active sequences being merged at any point in time, queuing the rest in a way similar to Concat.
- Added ManySelect operator which is the comonadic bind operator and is similar to ContinueWith on tasks but can be used for streams.
- Added IgnoreValues operator which behaves as Where(_ => false).
- Added GroupByUntil operator which is similar to GroupBy except that there’s a duration selector function to control the lifetime of each generated group.
- Removed Drain. The same behavior can be restored using the (updated) more general purpose Concat and Merge(n) operators.
- Fixed memory leaks in GroupJoin and Join where these operators held onto window disposables until the end of the (potentially infinite) outer source.
· Subjects changes:
- Added FastSubject, FastBehaviorSubject, FastAsyncSubject and FastReplaySubject which are much faster than regular subjects but:
- don’t decouple producer and consumer by an IScheduler (effectively limiting them to ImmediateScheduler);
- don’t protect against stack overflow;
- don’t synchronize input messages.
- Fast subjects are used by Publish and Prune operators if no scheduler is specified.
· Qbservable changes:
o Operators that take multiple observable sequences now check whether the supplied sequences implement IQbservable<T>. If so, their expression tree gets stitched in; otherwise, a ConstantExpression is used to wrap the sequence.
Download the different release flavors here:
- Download Rx 1.0.2856.0 for .NET 3.5 SP1
- Download Rx 1.0.2856.0 for .NET 4
- Download Rx 1.0.2856.0 for Silverlight 3
- Download Rx 1.0.2856.0 for Silverlight 4
- Download Rx 1.0.2856.0 for all common flavors
- Download Rx 1.0.2856.0 for XNA 4 XBOX 360
- Download Rx 1.0.2856.0 for XNA 3.1 Zune
- Download Rx 1.0.2856.0 for Windows Phone 7