Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/instructions/dynamicdata-cache.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,17 @@ Converts `IChangeSet<T,K>` into `IObservable<Change<T,K>>` — one emission per

Converts `IChangeSet<T,K>` to `IChangeSet<T>` — drops the key to produce a list changeset.

Positions are tracked independently per subscription by cache key, not item equality, so equal values and shared object references remain distinct entries. Partial streams keep unspecified indexes where the observed history cannot establish a position.

| Input | Output |
|-------|--------|
| **Add** | Individual Add, preserving the supplied index or unspecified-index marker. |
| **Update** | Remove of the previous value followed by Add of the current value; known key positions identify the removal. |
| **Remove** | Individual Remove using the supplied or known key position. |
| **Refresh** | Self-Replace using the known key position, or unspecified indexes if unknown. |
| **Moved** | Moved with the supplied positions. |
| **OnError / OnCompleted** | Forwards the terminal notification. |

### EnsureUniqueKeys

Validates that all keys in each changeset are unique. Throws if duplicates detected.
Expand Down
2 changes: 2 additions & 0 deletions .github/instructions/dynamicdata-list.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@ cache.Connect()
.RemoveKey() // IChangeSet<T, TKey> → IChangeSet<T>
```

`RemoveKey()` tracks known positions by cache key before discarding keys from the output. Equal-valued entries retain separate positions; partial streams preserve unspecified indexes where positions cannot be inferred. Updates remain Remove/Add pairs and refreshes remain self-Replaces.

---

## Writing a New List Operator
Expand Down
Loading
Loading