/// <summary> /// Initializes a new instance of the <see cref="MonitorHandlerAsync{T}"/> class. /// Use this instance if you need to inject a logger, for example for testing /// </summary> /// <param name="controlBusSender">The control bus command processor, to post over</param> /// <param name="logger">The logger</param> public MonitorHandlerAsync(IAmAControlBusSenderAsync controlBusSender, ILog logger) : base(logger) { _controlBusSender = controlBusSender; }
/// <summary> /// Initializes a new instance of the <see cref="MonitorHandlerAsync{T}"/> class. /// </summary> /// <param name="controlBusSender">The control bus command processor, to post over</param> public MonitorHandlerAsync(IAmAControlBusSenderAsync controlBusSender) : this(controlBusSender, LogProvider.GetCurrentClassLogger()) { }
/// <summary> /// Initializes a new instance of the <see cref="MonitorHandlerAsync{T}"/> class. /// </summary> /// <param name="controlBusSender">The control bus command processor, to post over</param> public MonitorHandlerAsync(IAmAControlBusSenderAsync controlBusSender) : this(controlBusSender, LogProvider.For <MonitorHandlerAsync <T> >()) { }
/// <summary> /// Initializes a new instance of the <see cref="MonitorHandlerAsync{T}"/> class. /// </summary> /// <param name="controlBusSender">The control bus command processor, to post over</param> /// <param name="monitorConfiguration"></param> public MonitorHandlerAsync(IAmAControlBusSenderAsync controlBusSender, MonitorConfiguration monitorConfiguration) { _controlBusSender = controlBusSender; _isMonitoringEnabled = monitorConfiguration.IsMonitoringEnabled; _instanceName = monitorConfiguration.InstanceName; }
/// <summary> /// Initializes a new instance of the <see cref="MonitorHandlerAsync{T}"/> class. /// </summary> /// <param name="controlBusSender">The control bus command processor, to post over</param> /// <param name="monitorConfiguration"></param> public MonitorHandlerAsync(IAmAControlBusSenderAsync controlBusSender, MonitorConfiguration monitorConfiguration) : this(controlBusSender, LogProvider.For <MonitorHandlerAsync <T> >(), monitorConfiguration) { }