/// <inheritdoc /> IParametersPipeline IPipelineFactory.CreateWithScope(IServiceScope pipelineScope) { var asyncPipeline = pipelineScope .To(scope => new ServiceScopeMiddlewareResolver(scope)) .To(resolver => new AsyncPipeline <ParametersManagementContext>(resolver)) .Add <ValueCalculationsMiddleware>() .Add <ValuesHistoryMiddleware>() .Add <ParametersAdjustmentMiddleware>(); var pipelineContext = pipelineScope.ServiceProvider.GetRequiredService <ParametersManagementContext>(); return(new DefaultParametersPipeline(asyncPipeline, pipelineContext)); }