/// <summary>
        /// class constructor
        /// </summary>
        /// <param name="services"></param>
        /// <param name="monitorLoggerSender"></param>
        /// <param name="monitorLogger"></param>
        /// <param name="configuration"></param>
        public MonitorLoggerBackgroundService(IServiceProvider services, MonitorLoggerSender monitorLoggerSender, MonitorLogger monitorLogger, IConfiguration configuration)
        {
            _services = services;
            var sectionName = typeof(MonitorLoggerConfiguration).Name;
            var options     = new MonitorLoggerConfiguration();

            configuration.GetSection(sectionName).Bind(options);
            _config = options;

            _monitorLoggerSender            = monitorLoggerSender;
            monitorLogger.BackgroundService = this;
        }
Exemple #2
0
 /// <summary>
 /// A constructor
 /// </summary>
 /// <param name="monitorLogger"></param>
 /// <param name="httpContextAccessor"></param>
 public HttpClientMonitor(MonitorLogger monitorLogger, IHttpContextAccessor httpContextAccessor)
 {
     this._monitorLogger       = monitorLogger;
     this._httpContextAccessor = httpContextAccessor;
 }
Exemple #3
0
 public PayloadMonitorLogger(MonitorLogger monitorLogger)
 {
     _monitorLogger = monitorLogger;
 }