public void Start() { this.state = ServiceStatus.DISCONNECTED; rHandler = RedisHandler.Instance; rHandler.ConnectionStatusChanged += OnRedisHandlerConnectionStateChanged; rHandler.ConnectionStatusNotification += OnRedisHandlerConnectionNotificationStatus; rHandler.NewService("extrinsics"); ServiceConnectionStateChanged += OnServiceConnectionStateChanged; }
public void Start() { state = ServiceStatus.DISCONNECTED; rHandler = RedisHandler.Instance; rHandler.ConnectionStatusChanged += OnRedisHandlerConnectionStateChanged; rHandler.ConnectionStatusNotification += OnRedisHandlerConnectionStatusNotification; rHandler.NewService("texturer"); ServiceConnectionStateChanged += OnServiceConnectionStateChanged; }
public CustomerController(ICustomerServer customerServer, IConfiguration configuration) { try { _log = LogManager.GetLogger(typeof(CustomerController)); _customerServer = customerServer; _configuration = configuration; _redis = new RedisHandler(); _result = new ResultObject(); } catch (Exception ex) { _log.Error("CustomerController method error:" + ex); } }
void Start() { rect = new Rect(0, 0, screenWidth, screenHeight); renderTexture = new RenderTexture(screenWidth, screenHeight, 24); texture = new Texture2D(screenWidth, screenHeight, TextureFormat.RGB24, false); state = ServiceStatus.DISCONNECTED; rHandler = RedisHandler.Instance; rHandler.ConnectionStatusChanged += OnRedisHandlerConnectionStateChanged; rHandler.ConnectionStatusNotification += OnRedisHandlerConnectionStatusNotification; rHandler.NewService("recorder"); ServiceConnectionStateChanged += OnServiceConnectionStateChanged; }
private bool disposedValue = false; // To detect redundant calls public UnitOfWork(IConfiguration configuration) { _redisHandler = new RedisHandler(); _configuration = configuration; //_redisHandler = new RedisHandler(_configuration); _connection = new SqlConnection(_configuration.GetSection("Appsettings:ConnectionString").Value); _connection.Open(); _transaction = _connection.BeginTransaction(); _genericRepository = new GenericRepository <T>(_transaction); _tokenHandler = new JwtSecurityTokenHandler(); _authRepository = new AuthRepository(_transaction); _titleRepository = new TitleRepository(_transaction); _entryRepository = new EntryRepository(_transaction); _helperRepository = new HelperRepository(_transaction); }
static void Main(string[] args) { Console.WriteLine("Hello Redis!"); _redisHandler = new RedisHandler("127.0.0.1:6379"); Console.WriteLine($"connected?{_redisHandler.IsConnected}"); Console.WriteLine($"set?{_redisHandler.Set("key1", "value1")}"); var getValue = _redisHandler.Get <string>("key1"); Console.WriteLine($"get key1?{getValue}"); Console.WriteLine($"remove key1?{_redisHandler.Remove("key1")}"); getValue = _redisHandler.Get <string>("key1"); Console.WriteLine($"get key1?{getValue}"); dynamic dobj = new ExpandoObject(); dobj.key1 = "value1"; dobj.key2 = "value2"; dobj.key3 = 1000; var jsonObject = JsonConvert.SerializeObject(dobj); _redisHandler.Set <string>("json", jsonObject); Console.WriteLine(_redisHandler.Get <string>("json")); Console.WriteLine($"keys:{_redisHandler.GetKeyAll().ToString<String>()}"); using (var manager = _redisHandler.GetRedisManagerPool()) { using (var client = manager.GetClient()) { Console.WriteLine($"ping:{client.Ping()}"); } } }
public WeChatLoginController(WeChatServiceHandler weChatServiceHandler, RedisHandler redisHandler) { _weChatServiceHandler = weChatServiceHandler; _redisHandler = redisHandler; }
public TemplateController(WeChatServiceHandler weChatServiceHandler, RedisHandler redisHandler) { _weChatServiceHandler = weChatServiceHandler; _redisHandler = redisHandler; }