internal ScanResult SendExpectScanResult(byte[] cmd, params byte[][] args)
        {
            var cmdWithArgs = MergeCommandWithArgs(cmd, args);
            var multiData = SendExpectDeeplyNestedMultiData(cmdWithArgs);
            var counterBytes = (byte[])multiData[0];

            var ret = new ScanResult
            {
                Cursor = ulong.Parse(counterBytes.FromUtf8Bytes()),
                Results = new List<byte[]>()
            };
            var keysBytes = (object[])multiData[1];

            foreach (var keyBytes in keysBytes)
            {
                ret.Results.Add((byte[])keyBytes);
            }

            return ret;
        }
예제 #2
0
 public static List <string> AsStrings(this ScanResult result)
 {
     return(result.Results.Map(x => x.FromUtf8Bytes()));
 }