As described in this article.
https://cardinalcore.co.uk/2014/07/02/sitecore-pipelines-commands-using-ioc-containers/
you can use pipeline "ref" and "factory" attributes, to use dependency injection on a pipeline.
There are newer ways of doing this since sitecore 8.2 (Infact 8.2 update 2 didn't work with this setup, and we had to wait for 8.2 update 3+) As we use Castle, we can't use the Dependency Resolver, as that doesn't call release and cause memory leaks. So utilising this older way of doing dependency injection, which does allow us to call release. (We also are using ControllerFactory for the same reason)
We've just started at looking at how much work to upgrade to Sitecore 9.
ISetting and IFactory have made Obsolete(Infact whole Sitecore.Abstraction.dll removed and moved to Sitecore.kernel.dll)
> Obsolete("Use Sitecore.Kernel!Sitecore.Abstractions.BaseCorePipelineManager instead.")]
> public interface ICorePipeline
>
> [Obsolete("Use Sitecore.Kernel!Sitecore.Abstractions.BaseFactory instead.")]
> public interface IFactory
>
> [Obsolete("Use Sitecore.Kernel!Sitecore.Abstractions.BaseRuleFactory instead.")]
> public interface IRuleFactory
And instead of the interface has been replaced with abstract class.
Primary Question - Sitecore support have confirmed this works
Are these hooks still available in sitecore 9 to use "ref" and "factory" to do dependency injection in Sitecore 9? And do they work?
If so how can our Factory (which uses Castle) implement IFactory without getting a obsolete build warning, or how would we use the replacement base factory in a "ref" and "factory" scenario?
Just realised that this is using the Sitecore.Reflection.IFactory
Resolved
Secondary Question
The "ISetting" & "ICorePipeline" & "IFactory" we were using in our Dependency Injection setup, how could we use the replacement abstract classes to achieve the old behaviour in our DI setup without getting the obsolete build warnings?
As we'll need to move away from this when this obsolete code is removed in a future version.
resolve="true"
attribute on processors? kamsar.net/index.php/2016/08/…