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
Migrated GetContentTypes() to new Refresh() method
Migrated the `TopicRepositoryBase.GetContentTypes()` method to utilize the newly introduced `ContentTypeDescriptorCollection.Refresh()` method (3e3930f). This prevents it from needing to rely on the `GetContentTypes(ContentTypeDescriptor)` overload for centralizing functionality—which, in turn, depended on an unintuitive state tracking via the `_contentTypeDescriptors` field initialization to avoid a circular loop (since each function calls into the other).
As part of this, I was also able to make the `_contentTypeDescriptors` field readonly, thus helping avoid a confusing scenario where updating the cache would change which `ContentTypeDescriptorCollection` the field referenced, thus orphaning any preexisting references.
Finally, I renamed `allowedContentTypes` to `contentTypes` to avoid confusion. (`AllowsContentTypes` is a property/attribute used to track what content types can be created under an instead of a particular content type. That concept doesn't apply here, thus the name is misleading.)
0 commit comments