/// <summary>
 /// Initialises a new instance of the <see cref="TaskExecutor" /> class.
 /// </summary>
 /// <param name="apiOperationExecutor">The API operation executor that can handle incoming background tasks.</param>
 /// <param name="rootServiceProvider">The root <see cref="IServiceProvider" /> of the application.</param>
 /// <param name="apmTool">The APM integration.</param>
 public TaskExecutor(
     IApiOperationExecutor apiOperationExecutor,
     IServiceProvider rootServiceProvider,
     IApmTool apmTool)
 {
     this._apiOperationExecutor = apiOperationExecutor;
     this._rootServiceProvider  = rootServiceProvider;
     this._apmTool = apmTool;
 }
Exemple #2
0
        /// <summary>
        /// Initialises a new instance of the <see cref="BackgroundTaskScheduler" /> class.
        /// </summary>
        /// <param name="backgroundTaskPreprocessors">The registered background task preprocessors.</param>
        /// <param name="backgroundTaskScheduleProvider">The provider-specific implementation to delegate to.</param>
        /// <param name="apmTool">The registered APM tool used to register a dependency with.</param>
        /// <param name="logger">The logger for this class.</param>
        public BackgroundTaskScheduler(
            IEnumerable <IBackgroundTaskPreprocessor> backgroundTaskPreprocessors,
            IBackgroundTaskScheduleProvider backgroundTaskScheduleProvider,
            IApmTool apmTool,
            ILogger <BackgroundTaskScheduler> logger)
        {
            Guard.NotNull(nameof(backgroundTaskScheduleProvider), backgroundTaskScheduleProvider);
            Guard.NotNull(nameof(apmTool), apmTool);
            Guard.NotNull(nameof(logger), logger);

            this._backgroundTaskScheduleProvider = backgroundTaskScheduleProvider;
            this._backgroundTaskPreprocessors    = backgroundTaskPreprocessors;
            this._apmTool = apmTool;
            this._logger  = logger;
        }
 public BlueprintApiRouter(
     IApiOperationExecutor apiOperationExecutor,
     IApmTool apmTool,
     IServiceProvider rootServiceProvider,
     ILogger <BlueprintApiRouter> logger,
     IOptions <BlueprintHttpOptions> httpOptions,
     string basePath)
 {
     this._apiOperationExecutor = apiOperationExecutor;
     this._apmTool             = apmTool;
     this._rootServiceProvider = rootServiceProvider;
     this._logger      = logger;
     this._httpOptions = httpOptions;
     this._basePath    = basePath;
 }
Exemple #4
0
 /// <summary>
 /// Initialises a new instance of the <see cref="ApmBackgroundTaskScheduleProvider" /> class.
 /// </summary>
 /// <param name="innerProvider">The <see cref="IBackgroundTaskScheduleProvider" /> to wrap.</param>
 /// <param name="apmTool">The registered APM tool to enable cross-process tracing.</param>
 public ApmBackgroundTaskScheduleProvider(IBackgroundTaskScheduleProvider innerProvider, IApmTool apmTool)
 {
     this._innerProvider = innerProvider;
     this._apmTool       = apmTool;
 }