internal bool IsEqual(CommandBytes expected) { if (expected.Length != Payload.Length) { return(false); } return(new CommandBytes(Payload).Equals(expected)); }
internal bool StartsWith(CommandBytes expected) { var len = expected.Length; if (len > Payload.Length) { return(false); } var rangeToCheck = Payload.Slice(0, len); return(new CommandBytes(rangeToCheck).Equals(expected)); }
internal void AppendDeltas(StringBuilder sb) { for (int i = 0; i < map.Length; i++) { var keyString = ((RedisCommand)i).ToString(); var keyBytes = new CommandBytes(keyString); var value = map[i]; if (!keyBytes.Equals(value)) { if (sb.Length != 0) { sb.Append(','); } sb.Append('$').Append(keyString).Append('=').Append(value); } } }