You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cache instructions: Added ObservableChangeSet.Create section with
8 overloads documented, 3 practical examples (sync event bridge,
async API loading, SignalR live updates), key behaviors explained.
List instructions: Added ObservableChangeSet.Create<T> section with
sync and async examples (FileSystemWatcher, async stream).
Main instructions: Added 'Maintaining These Instructions' section
requiring new operators to be added to instruction files, operator
behavior changes to update tables, new utilities/domain types to
be documented.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Changing the default behavior of an existing overload
61
61
62
+
## Maintaining These Instructions
63
+
64
+
These instruction files are living documentation. **They must be kept in sync with the code.**
65
+
66
+
- When a **new operator** is added, it **MUST** be added to the appropriate instruction file (`dynamicdata-cache.instructions.md` or `dynamicdata-list.instructions.md`) with its change reason handling table.
67
+
- When an **operator's behavior changes**, update its table in the instruction file.
68
+
- When a **new test utility** is added, update the test utilities reference in the main instructions and the appropriate `testing-*.instructions.md`.
69
+
- When a **new domain type** is added to `Tests/Domain/`, add it to the Domain Types section.
`ObservableChangeSet.Create` is the cache equivalent of `Observable.Create`. It gives you a `SourceCache` inside a lambda and returns `IObservable<IChangeSet<T,K>>` — the cache is created and disposed automatically per subscriber.
62
+
63
+
This is the **preferred way to bridge imperative code into DynamicData** without managing a `SourceCache` lifetime yourself.
64
+
65
+
```csharp
66
+
// Synchronous — populate the cache, return a cleanup action
Copy file name to clipboardExpand all lines: .github/instructions/dynamicdata-list.instructions.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,46 @@ list.Edit(inner =>
62
62
});
63
63
```
64
64
65
+
## ObservableChangeSet.Create — Implicit List Factory
66
+
67
+
`ObservableChangeSet.Create<T>` (single type parameter, no key) is the list equivalent. It gives you a `SourceList` inside a lambda and returns `IObservable<IChangeSet<T>>`.
68
+
69
+
```csharp
70
+
// Synchronous — populate the list, return cleanup
0 commit comments