Commit 41598c5
committed
Marked
The `Topic` class contains a number of convenience methods for accessing (and setting) popular attributes. These were useful back when we worked directly with the `Topic` entities in our views (ugh!). Since we now use view models (e.g., `ITopicViewModel`) alongside the `TopicMappingService`, these don't provide as much benefit, as we can expose strongly typed accessor properties on our view models as needed, and have them automatically mapped to attributes. Given this, we're removing accessor properties that don't include business logic and aren't widely used within our libraries.
I also updated the `ReverseTopicMappingServiceTest` to account for this change, as it used the accessor method in one of its unit tests.
There are other convenience methods we will be keeping for now because they provide internal benefits. For instance, `IsHidden` and `IsDisabled` are frequently used by the library itself. Also, `Title` has the benefit of providing a fallback to `Key` if the `Title` isn't provided, which is useful—and especially since this accessor is utilized by the `TopicMappingService`.Description property as [Obsolete]
1 parent a3f0cba commit 41598c5
2 files changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| |||
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
153 | | - | |
| 154 | + | |
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| 371 | + | |
371 | 372 | | |
372 | 373 | | |
373 | 374 | | |
| |||
0 commit comments