public static QCode GetQCodeFromOpCode(byte opCode) { QCode q = _qCodesOrdered[opCode]; if (q == null) { q = new QCode(opCode, "!! INVALID QCODE !!"); } return(q); }
private static void BuildTables(QCode[] unordered) { _qCodesOrdered = new QCode[256]; for (int i = 0; i < unordered.Length; i++) { int index = unordered[i].Code; if (_qCodesOrdered[index] != null) { throw new InvalidOperationException(String.Format("Duplicate QCode entry {0}", index)); } _qCodesOrdered[index] = unordered[i]; } }