private byte[][] GetRangeByScore(byte[] commandBytes,
string setId, double min, double max, int? skip, int? take, bool withScores)
{
if (setId == null)
throw new ArgumentNullException("setId");
var cmdWithArgs = new List<byte[]>
{
commandBytes, setId.ToUtf8Bytes(), min.ToFastUtf8Bytes(), max.ToFastUtf8Bytes()
};
if (skip.HasValue || take.HasValue)
{
cmdWithArgs.Add(Commands.Limit);
cmdWithArgs.Add(skip.GetValueOrDefault(0).ToUtf8Bytes());
cmdWithArgs.Add(take.GetValueOrDefault(0).ToUtf8Bytes());
}
if (withScores)
{
cmdWithArgs.Add(Commands.WithScores);
}
return SendExpectMultiData(cmdWithArgs.ToArray());
}