public RedisListenerAgentStartup(RedisClient redisClient, IOptions <RedisListenerOptions> redisListenerOptions, IExtractCommand extractCommand) { _redisClient = redisClient; _redisListenerOptions = redisListenerOptions.Value; _extractCommand = extractCommand; RedisListenerKey = $"Bucket.Listener.{_redisListenerOptions.ListenerKey}"; }
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(); }); }
public RedisPublishCommand(RedisClient redisClient, IOptions <RedisListenerOptions> redisListenerOptions) { _redisClient = redisClient; _redisListenerOptions = redisListenerOptions.Value; }