BookSleeve.RedisMessage.RedisMessage C# (CSharp) Method

RedisMessage() protected method

protected RedisMessage ( int db, RedisLiteral command ) : System
db int
command RedisLiteral
return System
        protected RedisMessage(int db, RedisLiteral command)
        {
            bool isDbFree = false;
            for (int i = 0; i < dbFree.Length; i++ )
            {
                if(dbFree[i] == command)
                {
                    isDbFree = true;
                    break;
                }
            }
            if(isDbFree)
            {
                if (db >= 0) throw new ArgumentOutOfRangeException("db", "A db is not required for " + command);
            }
            else
            {
                if (db < 0) throw new ArgumentOutOfRangeException("db", "A db must be specified for " + command);
            }
            this.db = db;
            this.command = command;
        }

Same methods

RedisMessage::RedisMessage ( ) : System