public void AddData(byte[] data) { var opCode = OpCodeUtil.CanonicalOpCodeForData(data); var parsedOpCode = new ParsedOpCode(opCode, data); AddOpCode(parsedOpCode); }
private static string BuildMessage(OpCode opCode, byte[] data) { var msgData = Hex.ToHexString(data ?? new byte[0]); var canonicalOpcode = OpCodeUtil.CanonicalOpCodeForData(data); return("OpCode not optimal for payload. " + $"Encountered {opCode} rather than " + $"{canonicalOpcode} for '{msgData}'"); }