public async Task <ISubscriber> GetSubscriberAsync(string redisConnectionString) { if (string.IsNullOrWhiteSpace(redisConnectionString)) { throw new ArgumentNullException(redisConnectionString); } var connect = await DefaultRedisPersistentConnection.GetConnectAsync(redisConnectionString); if (!connect.IsConnected()) { connect = await DefaultRedisPersistentConnection.TryConnectAsync(redisConnectionString); } return(connect.GetSubscriber()); }
public async Task <IDatabase> GetDatabaseAsync(string redisConnectionString = null, int db = 0, object asyncState = null) { if (string.IsNullOrWhiteSpace(redisConnectionString)) { throw new ArgumentNullException(redisConnectionString); } var connect = await DefaultRedisPersistentConnection.GetConnectAsync(redisConnectionString); if (!connect.IsConnected()) { connect = await DefaultRedisPersistentConnection.TryConnectAsync(redisConnectionString); } return(connect.GetDatabase(db, asyncState)); }