IPublishedContentQuery has three incoming dependencies that need to be resolved. ExamineManager is easy, but the concrete classes I find in the 8.18 source (from GitHub) for IPublishedSnapshot and IVariationContextAccessor are internal. The PublishedContentQuery throws class exceptions if they are null;
The use of IPublishedContentQuery is deeper into shared code so removing it would be a lot of effort so I want to avoid that route. The Umbraco source isn't mine so I can't edit it :)
Anyway I wanted to throw the question out there and see if anyone has seen a similar problem and perhaps has a solution.
I just want to try again to see if anyone has run into this before. I was hoping that I'm not the only one using Unity or other DI for deeper Umbraco core classes. All help is appreciated!
DI for IPublishedContentQuery with Unity
All, I'm upgrading a site and a windows service to U8.18.8 from 7.
In the windows service, we use Unity for DI, and I need some help on the DI for the IPublishedContentQuery. Normally it's just:
IPublishedContentQuery has three incoming dependencies that need to be resolved. ExamineManager is easy, but the concrete classes I find in the 8.18 source (from GitHub) for IPublishedSnapshot and IVariationContextAccessor are internal. The PublishedContentQuery throws class exceptions if they are null;
The use of IPublishedContentQuery is deeper into shared code so removing it would be a lot of effort so I want to avoid that route. The Umbraco source isn't mine so I can't edit it :)
Anyway I wanted to throw the question out there and see if anyone has seen a similar problem and perhaps has a solution.
Thanks in advance, Drew
I just want to try again to see if anyone has run into this before. I was hoping that I'm not the only one using Unity or other DI for deeper Umbraco core classes. All help is appreciated!
is working on a reply...