Пример #1
0
 public ProtocolEncoder(RedisSettings settings) :
     base(settings)
 {
     _sharedBuffer   = new byte[settings.EncodingBufferSize];
     _encodingBuffer = new byte[settings.EncodingBufferSize];
     _encoding       = settings.EncodingOverride ?? Encoding.UTF8;
 }
Пример #2
0
        public RedisClientBase(RedisSettings settings) :
            base(settings)
        {
            _executor = new ImmediateExecutor();
            _executor.Init(this);

            Reset();
        }
Пример #3
0
 public ProtocolReader(RedisSettings settings, ProtocolEncoder encoder,
                       Stream stream) :
     base(settings)
 {
     _stream  = stream;
     _reader  = new RedisReader(stream, settings);
     _encoder = encoder;
 }
Пример #4
0
        public RedisReader(Stream stream, RedisSettings settings)
        {
            SAssert.ArgumentNotNull(() => stream);
            SAssert.ArgumentSatisfy(() => stream, s => s.CanRead, "Stream must be readable.");
            SAssert.ArgumentNotNull(() => settings);

            _settings = settings;
            _stream   = new BufferedStream(stream, _settings.ReadBufferSize);
        }
Пример #5
0
        public ProtocolWriter(RedisSettings settings, ProtocolEncoder encoder,
                              Stream stream) :
            base(settings)
        {
            _stream  = stream;
            _writer  = new RedisWriter(stream, settings);
            _encoder = encoder;

            AutoFlush = false;
        }
Пример #6
0
        public RedisWriter(Stream stream, RedisSettings settings)
        {
            SAssert.ArgumentNotNull(() => stream);
            SAssert.ArgumentSatisfy(() => stream, s => s.CanWrite, "Stream must be writable.");
            SAssert.ArgumentNotNull(() => settings);

            _settings  = settings;
            _stream    = new BufferedStream(stream, _settings.WriteBufferSize);
            _strBuffer = new byte[_settings.EncodingBufferSize];

            AutoFlush = false;
        }
Пример #7
0
 public RedisClient(RedisSettings settings) : base(settings)
 {
 }
Пример #8
0
 public RedisClientBase(string host = RedisSettings.DefaultHost,
                        int port    = RedisSettings.DefaultPort) :
     this(RedisSettings.Build().Host(host).Port(port))
 {
 }
Пример #9
0
 public ProtocolEncoder(RedisSettings settings)
     : base(settings)
 {
     _buffer = new byte[settings.EncodingBufferSize];
       _encoding = settings.EncodingOverride ?? Encoding.UTF8;
 }
Пример #10
0
 public ThreadwisePool(RedisSettings settings, int?db = null) :
     base(settings, db)
 {
 }
Пример #11
0
 internal Builder(RedisSettings instance)
 {
     _settings = instance;
 }
Пример #12
0
 public Builder()
 {
     _settings = new RedisSettings();
 }
Пример #13
0
 public AutoActivatingPool(RedisSettings settings) :
     base(settings)
 {
 }
Пример #14
0
 internal Builder(RedisSettings instance)
 {
     _settings = instance;
 }
Пример #15
0
 public Builder()
 {
     _settings = new RedisSettings();
 }
Пример #16
0
 public RedisClientBase(RedisSettings settings) :
     base(settings)
 {
     Reset();
 }