Skip to content

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

Open
dwcullop wants to merge 1 commit into
reactivemarbles:mainfrom
dwcullop:maint/cache_ext_breakup
Open

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

Conversation

@dwcullop
Copy link
Copy Markdown
Member

Splits ObservableCacheEx.cs (6,833 lines, 100 distinct operator names spanning 290 method bodies) into 24 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. All 2,218 unit tests pass.

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, SubscribeMany (2)
ObservableCacheEx.Merge.cs MergeChangeSets (16), MergeMany (2), MergeManyItems (2), Switch (2)
ObservableCacheEx.MergeManyChangeSets.cs MergeManyChangeSets (14), DefaultResortOnSourceRefresh const
ObservableCacheEx.Notifications.cs OnItemAdded (2), OnItemRefreshed (2), OnItemRemoved (2), OnItemUpdated (2), OnChangeAction (2, private helper)
ObservableCacheEx.Populate.cs PopulateFrom (2), PopulateInto (3)
ObservableCacheEx.PropertyChanged.cs Watch, WatchValue (2), WhenAnyPropertyChanged, WhenPropertyChanged, WhenValueChanged
ObservableCacheEx.Query.cs DistinctValues, QueryWhenChanged (3), ToCollection, ToSortedCollection (2), TrueForAll (2), TrueForAny (2), TrueFor (private helper)
ObservableCacheEx.Sort.cs Sort (4), SortBy, DefaultSortResetThreshold const
ObservableCacheEx.ToObservableChangeSet.cs ToObservableChangeSet (2), ToObservableOptional (2)
ObservableCacheEx.Transform.cs Transform (9), TransformAsync (6), TransformImmutable, TransformOnObservable (2), TransformToTree, TransformWithInlineUpdate (4)
ObservableCacheEx.TransformMany.cs TransformMany (4), TransformManyAsync (6), TransformManySafeAsync (6), CreateChangeSetTransformer (3, private helper)
ObservableCacheEx.TransformSafe.cs TransformSafe (6), TransformSafeAsync (6)

Deleted

src/DynamicData/Cache/ObservableCacheEx.cs

Verification

The split was generated programmatically with byte-level per-method equality checks against the original. After the move, every public method (and all 14 private static helpers used internally by the public surface) was confirmed to be present in exactly one file in the same order it appeared in the original file. The full test suite (2,218 tests on net9.0) passes.

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.
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