Exemplo n.º 1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="options"></param>
 /// <param name="loggerFactory"></param>
 public DefaultRedisMessageBus(IOptions <RedisMessageBusOptions> options, ILoggerFactory loggerFactory)
 {
     _options        = options.Value;
     _loggerLazy     = new Lazy <ILogger>(() => loggerFactory?.CreateLogger <DefaultRedisMessageBus>() ?? NullLogger <DefaultRedisMessageBus> .Instance);
     _connectionLazy = new Lazy <ConnectionMultiplexer>(CreateConnection, true);
 }