Пример #1
0
        public void AddData(byte[] data)
        {
            var opCode       = OpCodeUtil.CanonicalOpCodeForData(data);
            var parsedOpCode = new ParsedOpCode(opCode, data);

            AddOpCode(parsedOpCode);
        }
Пример #2
0
        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}'");
        }