protected override void InitOpCodes()
{
var opcodes = (from method in GetType().GetMethods(BindingFlags.Instance | BindingFlags.NonPublic)
let attributes = (OpCodeAttribute[])method.GetCustomAttributes(typeof(OpCodeAttribute), false)
from attribute in attributes
from id in attribute.Ids
group method by id);
//.ToDictionary(o => o.OpCode, o => o.Action);
_opCodes = new Dictionary<byte, Action>();
foreach (var op in opcodes)
{
_opCodes.Add(op.Key, op.OrderByDescending(o => GetDepth(o.DeclaringType)).Select(OpCode).First());
}
}