コード例 #1
0
 public RedisListenerAgentStartup(RedisClient redisClient, IOptions <RedisListenerOptions> redisListenerOptions, IExtractCommand extractCommand)
 {
     _redisClient          = redisClient;
     _redisListenerOptions = redisListenerOptions.Value;
     _extractCommand       = extractCommand;
     RedisListenerKey      = $"Bucket.Listener.{_redisListenerOptions.ListenerKey}";
 }
コード例 #2
0
 public RedisListenerAgentStartup(RedisClient redisClient, IOptionsMonitor <RedisListenerOptions> redisListenerOptions, IExtractCommand extractCommand)
 {
     _redisClient          = redisClient;
     _redisListenerOptions = redisListenerOptions.CurrentValue;
     _extractCommand       = extractCommand;
     RedisListenerKey      = $"Bucket.Listener.{_redisListenerOptions.ListenerKey}";
     redisListenerOptions.OnChange(async(options) => {
         _redisListenerOptions = options;
         RedisListenerKey      = $"Bucket.Listener.{_redisListenerOptions.ListenerKey}";
         await SubscribeAsync();
     });
 }
コード例 #3
0
 public RedisPublishCommand(RedisClient redisClient, IOptions <RedisListenerOptions> redisListenerOptions)
 {
     _redisClient          = redisClient;
     _redisListenerOptions = redisListenerOptions.Value;
 }