No puede seleccionar más de 25 temas
Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
|
- using Microsoft.Extensions.Configuration;
-
- namespace Permission.Redis
- {
- public class RedisClientSingleton
- {
- private static RedisClient _redisClinet;
- private RedisClientSingleton() { }
-
- private static object _lockObj = new object();
-
- public static RedisClient GetInstance(IConfiguration config)
- {
- if (_redisClinet == null)
- {
- lock (_lockObj)
- {
- if (_redisClinet == null)
- {
- _redisClinet = new RedisClient(config);
- }
- }
- }
- return _redisClinet;
- }
- }
- }
|