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;
}