Workaround to this issue:
IPipelineContributor implementation:
public class RepositoryPipelineContributor : IPipelineContributor { private readonly IDependencyResolver resolver; public RepositoryPipelineContributor(IDependencyResolver resolver) { this.resolver = resolver; } public void Initialize(IPipeline pipelineRunner) { pipelineRunner.Notify(CreateRepository) .Before<KnownStages.IOperationExecution>(); } private PipelineContinuation CreateRepository(ICommunicationContext arg) { resolver.AddDependencyInstance<IRepository>(new Repository(), DependencyLifetime.PerRequest); return PipelineContinuation.Continue; } }
Then register the contributor in the IConfigurationSource file:
ResourceSpace.Uses.PipelineContributor<RepositoryPipelineContributor>();
Sam
source share