Commit 3e51b5c
committed
Direct mappings must be settable
A feature of the `TopicMappingLibrary` is to detect members whose names and types are the same between the source topic and the target POCO. In these cases, the value is set directly. That's useful, especially, for items like `VersionHistory`—a `List<DateTime>` collection—because the collection shouldn't be _mapped_, but it should be _maintained_.
In order to support this, however, the list must be writable as, currently, the mapping library isn't smart enough to identify that it's a collection, determine of the type of collection, and then copy all of the items over. In fact, that defeats the basic nature of the current check (which works for any type, not just collections) and would require far more logic to implement.
Given that, for now, we'll suppress the otherwise useful CA2227.1 parent 578b594 commit 3e51b5c
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
0 commit comments