Add R3↔Primitives bridges and range fast-paths#4
Merged
Conversation
Introduce bridging observers between R3 and Primitives in R3BridgeGenerator to adapt IObserver/Observer semantics and results. Add a new RangeConcatSignal and many range-backed fast paths across operators (Zip, CombineLatest, WithLatest, CollectList/Array, ForkJoin, First/FirstOrDefault/ToTask, Count/Any async helpers, Collect*Async) to avoid per-value subscriptions and allocations for RangeSignal. Extend FromEnumerable to accept CancellationToken and short-circuit array/read-only-list paths when not cancellable; expose ToSignal overloads that accept CancellationToken. Rename BehaviourSignal→BehaviorSignal and add debugger display + related type updates. ThreadPoolSequencer: introduce Timer alias, use strongly-typed Timers dictionary and minor null/exception-doc fixes. Add convenience Publish/Replay/Share extension overloads and multiple small API/documentation cleanups (remove redundant System. prefixes in XML refs, tweak exception tags). Misc: add helper methods for creating range-backed lists/arrays/values and a few disposable optimizations. These changes improve interop, performance for RangeSignal scenarios, and cancellation support for synchronous enumeration.
Move ConnectableSignalMixins and StateSignalMixins into their own files and remove duplicate implementations from existing files. Improve XML documentation across signal operator mixins (SignalOperatorMixins.cs) and clean up pragma warning disables in several signal files (CommandSignal{TResult}.cs, ReadOnlyState{T}.cs, StateSignal{T}.cs, ConnectableSignal{T}.cs). Add RefCount/AutoConnect gate logic with ConnectableSignalMixins and wire up state projection helper in StateSignalMixins. Miscellaneous small tidy-ups to comments and API contract descriptions. Affects: ConnectableSignalMixins.cs (new), StateSignalMixins.cs (new), ConnectableSignal{T}.cs, CommandSignal{TResult}.cs, ReadOnlyState{T}.cs, StateSignal{T}.cs, SignalOperatorMixins.cs, SignalOperatorParityMixins.Helpers.cs, SignalOperatorParityMixins.cs.
Introduce debugger-friendly displays across the library by adding System.Diagnostics.DebuggerDisplay attributes to many types and marking them partial. Add a new DebuggerDisplay.Partials.cs that centralizes private DebuggerDisplay properties (calling ToString()) for those partial types, includes a WINDOWS guard for DispatcherSequencer, and suppresses related analyzer warnings. Also update numerous types/structs to partial to enable the centralized debugger helpers. Additionally, update README.md to document new/renamed APIs and overloads (CompositeDisposable alias, Signal.FromEnumerable cancellation overload, Signal.FromAsync/Observable.FromAsync mappings, ToObservable cancellation notes, BehaviorSignal naming clarification, CountAsync/AnyAsync docs, etc.)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Introduce bridging observers between R3 and Primitives in R3BridgeGenerator to adapt IObserver/Observer semantics and results. Add a new RangeConcatSignal and many range-backed fast paths across operators (Zip, CombineLatest, WithLatest, CollectList/Array, ForkJoin, First/FirstOrDefault/ToTask, Count/Any async helpers, Collect*Async) to avoid per-value subscriptions and allocations for RangeSignal. Extend FromEnumerable to accept CancellationToken and short-circuit array/read-only-list paths when not cancellable; expose ToSignal overloads that accept CancellationToken.
Rename BehaviourSignal→BehaviorSignal and add debugger display + related type updates.
ThreadPoolSequencer: introduce Timer alias, use strongly-typed Timers dictionary and minor null/exception-doc fixes.
Add convenience Publish/Replay/Share extension overloads and multiple small API/documentation cleanups (remove redundant System. prefixes in XML refs, tweak exception tags).
Misc: add helper methods for creating range-backed lists/arrays/values and a few disposable optimizations.
These changes improve interop, performance for RangeSignal scenarios, and cancellation support for synchronous enumeration.