public static IServiceCollection AddDiagnosticeLogAnalyzer <T>(this IServiceCollection services, Action <IServiceProvider, AnalyzerConfig> options = null) where T : class, IAlertServicecs
 {
     services.AddSingleton(x =>
     {
         var config = new AnalyzerConfig();
         options?.Invoke(x, config);
         return(config);
     });
     services.AddScoped <IAlertServicecs, T>();
     services.AddSingleton <AnalyzerService>();
     services.AddHostedService(x => x.GetRequiredService <AnalyzerService>());
     return(services);
 }
 public MqConnAndChannel(AnalyzerConfig rabbitSetting, Action <object, BasicDeliverEventArgs> consumeAction)
 {
     this.rabbitSetting = rabbitSetting;
     this.consumeAction = consumeAction;
     LoadRbt();
 }