SharpDisasm.Tests/OpTableGeneration.cs
/// <summary>
/// Walk down the opcode tree, starting at a given opcode table, given a string of opcodes.
/// Return null if unable to walk, otherwise return the object at the leaf.
/// </summary>
/// <param name="tbl"></param>
/// <param name="opcodes"></param>
/// <returns></returns>
Walk down the opcode tree, starting at a given opcode table, given a string of opcodes.
Return null if unable to walk, otherwise return the object at the leaf.
Walk down the opcode tree starting at a given opcode table given a string of opcodes . Return null if unable to walk otherwise return the object at the leaf .
private object Walk(UdOpcodeTable tbl, string[] opcodes)
            {
                var opc = opcodes[0];
                var e = tbl.Lookup(opc);
                if (e == null)
                    return null;
                else if (e is UdOpcodeTable && opcodes.Length > 1)
                    return Walk((UdOpcodeTable)e, opcodes.Skip(1).ToArray());
                return e;
            }
private object Walk ( UdOpcodeTable tbl , string [ ] opcodes ) { var opc = opcodes [ 0 ] ; var e = tbl . Lookup ( opc ) ; if ( e == null ) return null ; else if ( e is UdOpcodeTable && opcodes . Length > 1 ) return Walk ( ( UdOpcodeTable ) e , opcodes . Skip ( 1 ) . ToArray ( ) ) ; return e ; }
Walk down the opcode tree, starting at a given opcode table, given a string of opcodes.
Walk down the opcode tree starting at a given opcode table given a string of opcodes .
None
tbl
UdOpcodeTable
None
opcodes
string[]
None