Commit afe7b70
committed
Simplified
Previously, when deleting a `ContentTypeDescriptor`, the `Delete()` function would identify all descendant `ContentTypeDescriptors` and delete any matches found in the `_contentTypeDescriptors` cache. This code isn't really necessary. A much shorter method is to simply repopulate the `_contentTypeDescriptor` using the new `SetContentTypeDescriptors()` overload (78a9d3f), which will lookup the root `ContentTypeDescriptor` from the topic graph and then recreate the cache without the deleted `ContentTypeDescriptor` (or its children).
In addition to being easier to maintain, this method is likely also a touch faster since it doesn't need to find all descendants, compare them against the original collection, and then remove them from teh collection.ContentTypeDescriptor update in Delete()
1 parent 5941385 commit afe7b70
1 file changed
Lines changed: 1 addition & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
| 481 | + | |
488 | 482 | | |
489 | 483 | | |
490 | 484 | | |
| |||
0 commit comments