Commit 86fd5c4
committed
Migrated view model
Microsoft's design guidelines recommend that public interfaces use `Collection<T>` instead of `List<T>` (CA1002). The `List<T>` type is faster, and optimized for performance, but includes a lot of low-level members that most users don't need, while `Collection<T>` has more high-level convenience members that are more intuitive for most users.
As this was a breaking change, however, we didn't implement this as part of our implementation of Microsoft's updated Code Analysis (27e6940). Now that we're preparing for a major release, we're able to make these changes which could potentially break some implementations.
Notably, this will break implementations that specifically access the member as a `List<T>` (e.g., as a cast or assignment), or which call some of the `List<T>` specific methods, such as `AddRange()`. These calls were previously removed from elsewhere in the OnTopic library in preparation for this migration, but may still persist in some client implementations.List<> properties to use Collection<>
1 parent 704c8de commit 86fd5c4
File tree
4 files changed
+6
-8
lines changed- OnTopic.Tests/ViewModels
- OnTopic
- Internal/Reflection
4 files changed
+6
-8
lines changedLines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 28 | + | |
31 | 29 | | |
32 | 30 | | |
33 | 31 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
| 457 | + | |
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
644 | 645 | | |
645 | 646 | | |
646 | 647 | | |
647 | | - | |
| 648 | + | |
648 | 649 | | |
649 | 650 | | |
650 | 651 | | |
| |||
0 commit comments