Skip to content

Split ObservableCacheEx.cs into per-family partial classes#1095

Open
dwcullop wants to merge 5 commits into
reactivemarbles:mainfrom
dwcullop:maint/cache_ext_breakup
Open

Split ObservableCacheEx.cs into per-family partial classes#1095
dwcullop wants to merge 5 commits into
reactivemarbles:mainfrom
dwcullop:maint/cache_ext_breakup

Conversation

@dwcullop
Copy link
Copy Markdown
Member

@dwcullop dwcullop commented May 26, 2026

Splits ObservableCacheEx.cs (6,830+ lines, 100 distinct operator names spanning 290 method bodies) into 19 partial-class files grouped by operator family. The two pre-existing partials (ObservableCacheEx.SortAndBind.cs, ObservableCacheEx.VirtualiseAndPage.cs) are untouched.

This is 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. Members within each new file are alphabetised; overloads of the same name preserve their original declaration order. All UTF-8 BOM with CRLF line endings, matching the rest of the codebase.

New files

Numbers in parentheses indicate the count of overloads.

File Members
ObservableCacheEx.Adapt.cs Adapt (2)
ObservableCacheEx.AutoRefresh.cs AutoRefresh (2), AutoRefreshOnObservable (2)
ObservableCacheEx.Batch.cs Batch, BatchIf (5)
ObservableCacheEx.Bind.cs Bind (12), TreatMovesAsRemoveAdd
ObservableCacheEx.ChangeStream.cs BufferInitial, DeferUntilLoaded (2), SkipInitial, StartWithEmpty (7), StartWithItem (2)
ObservableCacheEx.Combinators.cs And (5), Except (5), Or (5), Xor (5), Combine (5, private helper)
ObservableCacheEx.Conversions.cs AsObservableCache (2), Cast, ChangeKey (2), Convert, Flatten, FlattenBufferResult, OfType, RefCount
ObservableCacheEx.Edit.cs AddOrUpdate (5), Clear (3), Clone, EditDiff (4), InvokeEvaluate, Refresh (3), Remove (6), RemoveKey (2), RemoveKeys, UpdateIndex
ObservableCacheEx.Expiration.cs ExpireAfter (5), LimitSizeTo (2)
ObservableCacheEx.Filter.cs EnsureUniqueKeys, Filter (4), FilterImmutable, FilterOnObservable (2), IgnoreSameReferenceUpdate, IgnoreUpdateWhen, IncludeUpdateWhen, NotEmpty, SuppressRefresh, WhereReasonsAre, WhereReasonsAreNot, ForForced (2, private helper)
ObservableCacheEx.Group.cs Group (5), GroupOnObservable (2), GroupOnProperty, GroupOnPropertyWithImmutableState, GroupWithImmutableState, AdaptSelector (private helper)
ObservableCacheEx.Joins.cs FullJoin (2), FullJoinMany (2), InnerJoin (2), InnerJoinMany (2), LeftJoin (2), LeftJoinMany (2), RightJoin (2), RightJoinMany (2)
ObservableCacheEx.Lifecycle.cs AsyncDisposeMany, DisposeMany, FinallySafe, ForEachChange, MonitorStatus, PopulateFrom (2), PopulateInto (3), SubscribeMany (2)
ObservableCacheEx.Merge.cs MergeChangeSets (16), MergeMany (2), MergeManyChangeSets (14), MergeManyItems (2), Switch (2), DefaultResortOnSourceRefresh const
ObservableCacheEx.Notifications.cs OnItemAdded (2), OnItemRefreshed (2), OnItemRemoved (2), OnItemUpdated (2), OnChangeAction (2, private helper)
ObservableCacheEx.PropertyChanged.cs Watch, WatchValue (2), WhenAnyPropertyChanged, WhenPropertyChanged, WhenValueChanged
ObservableCacheEx.Query.cs DistinctValues, QueryWhenChanged (3), ToCollection, ToObservableChangeSet (2), ToObservableOptional (2), ToSortedCollection (2), TrueForAll (2), TrueForAny (2), TrueFor (private helper)
ObservableCacheEx.Sort.cs Sort (4), SortBy, DefaultSortResetThreshold const
ObservableCacheEx.Transform.cs Transform (9), TransformAsync (6), TransformImmutable, TransformMany (4), TransformManyAsync (6), TransformManySafeAsync (6), TransformOnObservable (2), TransformSafe (6), TransformSafeAsync (6), TransformToTree, TransformWithInlineUpdate (4), CreateChangeSetTransformer (3, private helper)

Deleted

src/DynamicData/Cache/ObservableCacheEx.cs

Verification

The split was generated programmatically with byte-level per-method equality checks against the original. Every public method and every private static helper used by the public surface was confirmed to be present in exactly one file. The full test suite passes.

dwcullop added 5 commits May 25, 2026 22:59
Splits the 6800-line ObservableCacheEx.cs into 24 smaller partial-class files grouped by operator family. Each method (and all of its overloads) lives in exactly one file. No code, comments, or XML documentation is added, removed, or otherwise modified; this is a pure file reorganization. All 2218 tests pass.
Splits the monolithic ObservableCacheEx.cs into 19 smaller partial-class files grouped by operator family. The two pre-existing partials (ObservableCacheEx.SortAndBind.cs, ObservableCacheEx.VirtualiseAndPage.cs) are untouched. Each method (and all of its overloads) lives in exactly one file. No code, XML documentation, comments, preprocessor directives, or constants are added, removed, or otherwise modified. The split was generated programmatically with byte-level per-method equality checks against the original.
Sorts members alphabetically by name within each new partial file. Overloads of the same name preserve their original declaration order. Constants sort before methods. Pre-existing partials (SortAndBind, VirtualiseAndPage) are not modified.
@dwcullop dwcullop enabled auto-merge (squash) May 26, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant