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
Would you consider merging a PR that increased the visibility of a few parts of MetadataFactory from private to protected? (It wouldn't necessary have to become part of the stable API - but allowing overriding of parts of the MetadataFactory will prevent me having to copy/paste large parts of it.)
My use case:
I'm trying to prevent a few round trips to the cache caused by a very 'deep' hierarchy of classes, all of which I know will have no metadata (the cache checks are unnecessary)
There's nothing overridable in the MetadataFactory that will allow me to short-circuit before the call to check the cache
I've looked into:
Adjusting the 'hierarchy' metadata class via constructor parameter
This class seems to just hold the results, and won't allow me to filter before incurring the cost of the cache round-trips
"Preloading" null metadata entries into the 'loadedMetadata' member array of the factory
This would allow the parent classes to be excluded without going to the cache, but the member array is private
Overriding getClassHierarchy(), which is probably closest to what I actually want to do
This would allow me to filter the hierarchy to the classes I care about, but getClassHierarchy() is private, so this requires copy/paste of about 60 lines - yuck
I can't seem to find a way around this, but if you have an alternative to suggest, I'd be happy to hear it. The long-term fix if you don't want to open up the internal API might be to use a strategy pattern for turning the class name into a hierarchy, so that I can override that part via DI.
The text was updated successfully, but these errors were encountered:
Would you consider merging a PR that increased the visibility of a few parts of
MetadataFactory
fromprivate
toprotected
? (It wouldn't necessary have to become part of the stable API - but allowing overriding of parts of the MetadataFactory will prevent me having to copy/paste large parts of it.)My use case:
I've looked into:
getClassHierarchy()
, which is probably closest to what I actually want to dogetClassHierarchy()
is private, so this requires copy/paste of about 60 lines - yuckI can't seem to find a way around this, but if you have an alternative to suggest, I'd be happy to hear it. The long-term fix if you don't want to open up the internal API might be to use a strategy pattern for turning the class name into a hierarchy, so that I can override that part via DI.
The text was updated successfully, but these errors were encountered: