コード例 #1
0
 /// <summary>
 /// Use existing multiplexer for performance
 /// </summary>
 /// <param name="multiplexer"></param>
 /// <param name="db"></param>
 public RedisClient(IConnectionMultiplexer multiplexer, int db)
 {
     Multiplexer = multiplexer;
     Db          = Multiplexer.GetDatabase(db);
     _provider   = new RedisQueryProvider <TValue>(this);
     Context     = new QueryableObject <TValue>(_provider);
 }
コード例 #2
0
 public RedisClient(string connectionString, int db)
 {
     Multiplexer = ConnectionMultiplexer.Connect(connectionString);
     Db          = Multiplexer.GetDatabase(db);
     _provider   = new RedisQueryProvider <TValue>(this);
     Context     = new QueryableObject <TValue>(_provider);
 }