Exemple #1
0
        public RedisDecoder(int maximumInlineMessageLength, IRedisMessagePool messagePool)
        {
            Contract.Requires(maximumInlineMessageLength > 0 &&
                              maximumInlineMessageLength <= RedisConstants.MaximumMessageLength);
            Contract.Requires(messagePool != null);

            this.maximumInlineMessageLength = maximumInlineMessageLength;
            this.messagePool = messagePool;
        }
Exemple #2
0
        public RedisEncoder(IRedisMessagePool messagePool)
        {
            if (messagePool is null)
            {
                ThrowHelper.ThrowArgumentNullException(ExceptionArgument.messagePool);
            }

            this.messagePool = messagePool;
        }
Exemple #3
0
        public RedisDecoder(int maxInlineMessageLength, IRedisMessagePool messagePool, bool decodeInlineCommands)
        {
            if (maxInlineMessageLength <= 0 || maxInlineMessageLength > RedisConstants.RedisMessageMaxLength)
            {
                throw new RedisCodecException($"maxInlineMessageLength: {maxInlineMessageLength} (expected: <= {RedisConstants.RedisMessageMaxLength})");
            }

            this.maxInlineMessageLength = maxInlineMessageLength;
            this.messagePool            = messagePool;
            this.decodeInlineCommands   = decodeInlineCommands;
        }
Exemple #4
0
        public RedisEncoder(IRedisMessagePool messagePool)
        {
            Contract.Requires(messagePool != null);

            this.messagePool = messagePool;
        }