Код: Выделить всё
public int Count()
{
var server = _conn.GetServer(_conn.GetEndPoints().First());
int count = 0;
var cursor = 0L;
do
{
var keys = server.Keys(cursor: cursor, pattern: GetPattern(), pageSize: batchSize);
count += keys.Count();
} while (cursor != 0);
return count;
}
Подробнее здесь: https://stackoverflow.com/questions/793 ... an-c-sharp
Мобильная версия