Skip to content

[doc-sync] Fix SortExpressionComparer usage in README reactive collections example #39

Description

@github-actions

Caution

Protected files were modified in this change.
This pull request is in request_review mode and requires explicit human scrutiny before merge.

Protected files: README.md

Summary

The README.md quick-start example for reactive collections used SortExpressionComparer<Person>.Ascending(p => p.Name), but SortExpressionComparer<T> is not ported to R3Ext.DynamicData. This is explicitly documented as a Known Gap in docs/LibraryParity.md:

SortExpressionComparer<T> — the fluent comparer-builder class... is not ported. The Sort operator accepts any IComparer<T>, so callers must supply their own implementation.

The Sort operator in R3Ext.DynamicData also has a convenient Sort(keySelector) overload that accepts a key-selector Func<TObject, TSortKey> directly, which is the idiomatic replacement.

Change

README.md line 116:

-    .Sort(SortExpressionComparer<Person>.Ascending(p => p.Name))
+    .Sort(p => p.Name)

Triggered by

Commit 53d312afeat: rename R3.DynamicData → R3Ext.DynamicData and harden CI packaging (#15) — introduced the single commit in this repo. Review of docs/LibraryParity.md (updated in that commit) confirmed SortExpressionComparer<T> is absent and revealed the mismatch in the README example.

Generated by 📚 Documentation Sync · sonnet46 1.6M ·


Note

This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch doc-sync/fix-sort-expression-comparer-readme-033461d291836a7b.

Click here to create the pull request

To fix the permissions issue, go to SettingsActionsGeneral and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ

Show patch (33 lines)
From 463aeea171754d2dd6d538e49d9d8dcfc9b17347 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Sun, 12 Jul 2026 09:25:48 +0000
Subject: [PATCH] docs: fix SortExpressionComparer usage in README reactive
 collections example

SortExpressionComparer<T> is not ported to R3Ext.DynamicData (documented
as a Known Gap in docs/LibraryParity.md). The Sort operator accepts either
an IComparer<T> or a key selector directly. Replace the example with the
built-in key-selector overload Sort(p => p.Name).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 9fbbfc7..8ebb647 100644
--- a/README.md
+++ b/README.md
@@ -113,7 +113,7 @@ var cache = new SourceCache<Person, int>(p => p.Id);
 // Observe changes with automatic caching
 cache.Connect()
     .Filter(p => p.IsActive)
-    .Sort(SortExpressionComparer<Person>.Ascending(p => p.Name))
+    .Sort(p => p.Name)
     .Transform(p => new PersonViewModel(p))
     .Bind(out var items)  // Bind to ObservableCollection
     .Subscribe();
-- 
2.54.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions