Split ObservableListEx.cs into per-family partial classes#1096
Open
dwcullop wants to merge 7 commits into
Open
Split ObservableListEx.cs into per-family partial classes#1096dwcullop wants to merge 7 commits into
dwcullop wants to merge 7 commits into
Conversation
Splits the 2900-line ObservableListEx.cs into 17 smaller partial-class files grouped by operator family. Each method (and all of its overloads) lives in exactly one file. The class declaration is changed to partial; no code, comments, or XML documentation is added, removed, or otherwise modified. All 2218 tests pass.
Renames ObservableListEx.Pagination.cs to ObservableListEx.Virtualise.cs for closer parity with the cache equivalent (ObservableCacheEx.VirtualiseAndPage.cs). Sorts members alphabetically within each new partial file; overloads of the same name preserve their original declaration order.
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the monolithic ObservableListEx.cs (~2929 lines) into 17 partial-class files grouped by operator family. The change is purely organizational: the class is converted to partial, identical using directives are added to each file, and method bodies are preserved byte-for-byte.
Changes:
- Splits
ObservableListExinto 17 partial files by operator family (Filter, Transform, Sort, Merge, etc.). - Adds family-scoped XML summary on each partial-class declaration.
- Deletes the original
src/DynamicData/List/ObservableListEx.cs.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ObservableListEx.Adapt.cs | Adapt operator. |
| ObservableListEx.AutoRefresh.cs | AutoRefresh / AutoRefreshOnObservable. |
| ObservableListEx.Bind.cs | Bind overloads. |
| ObservableListEx.ChangeStream.cs | BufferIf, BufferInitial, DeferUntilLoaded, NotEmpty, SkipInitial, StartWithEmpty. |
| ObservableListEx.Combinators.cs | And/Or/Except/Xor + private Combine helpers. |
| ObservableListEx.Conversions.cs | AddKey, AsObservableList, Cast, Clone, Convert, RefCount, RemoveIndex, ForEach*, FlattenBufferResult. |
| ObservableListEx.Expiration.cs | ExpireAfter, LimitSizeTo, Top. |
| ObservableListEx.Filter.cs | Filter overloads, FilterOnObservable, FilterOnProperty, DistinctValues, SuppressRefresh, WhereReasonsAre*. |
| ObservableListEx.Group.cs | GroupOn variants. |
| ObservableListEx.Lifecycle.cs | DisposeMany, PopulateInto, SubscribeMany. |
| ObservableListEx.Merge.cs | MergeChangeSets, MergeMany, MergeManyChangeSets, Switch. |
| ObservableListEx.Notifications.cs | OnItemAdded/Removed/Refreshed. |
| ObservableListEx.PropertyChanged.cs | WhenAnyPropertyChanged, WhenPropertyChanged, WhenValueChanged. |
| ObservableListEx.Query.cs | QueryWhenChanged, ToCollection, ToObservableChangeSet, ToSortedCollection. |
| ObservableListEx.Sort.cs | Sort, Reverse. |
| ObservableListEx.Transform.cs | Transform, TransformAsync, TransformMany. |
| ObservableListEx.Virtualise.cs | Page, Virtualise. |
…ad set) Mirrors the same convention applied to ObservableCacheEx (PR reactivemarbles#1095): 1. ONE FILE PER OPERATOR NAME (one overload set per file). The previous 17 family files are replaced with 63 per-operator partial files. 2. BARE ObservableListEx.cs FILE restored to carry the canonical class-level XML documentation. All partials carry the same canonical class summary ('Extensions for ObservableList.') so SA1601 is satisfied and there are no divergent per-file class docs. 3. PRIVATE HELPERS placed AFTER all public members within their containing file. The 5 private 'Combine' overloads (used by And, Except, Or, Xor) are placed at the bottom of And.cs (alphabetically first caller). The byte content of every method body is preserved (verified programmatically).
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.
Splits
ObservableListEx.cs(2,929 lines, 63 distinct operator names spanning 128 method bodies) into one partial-class file per operator name (overload set), following the convention now established forObservableCacheEx(see PR #1095).This revision replaces the earlier family-grouping split:
Bind.csorMergeChangeSets.csis now exactly that.ObservableListEx.csrestored as a bare partial carrying the canonical class XML doc. Every per-operator partial repeats the same canonical summary (Extensions for ObservableList.) so the documentation never diverges between files and SA1601 is satisfied.Combineoverloads (used byAnd,Except,Or,Xor) live at the bottom ofObservableListEx.And.cs— the alphabetically-first caller.This is still a pure file reorganisation. No code, no XML documentation, no comments, no preprocessor directives, and no constants were added, removed, or altered. The byte content of every method body is preserved (verified programmatically against the original).
Files
Plus
ObservableListEx.cs(bare partial carrying only the class XML doc).Verification
The split was generated programmatically with byte-level per-method equality checks against the original. Every public method and the 5 private
Combineoverloads used internally by the combinator operators were confirmed to be present in exactly one file. Library builds clean (0 errors).