/// <summary> /// Register special opcodes that must be handled from inside THIS class /// </summary> public MuftecLibSystem() { var internalOps = new OpCodePointer[] {ReadVariable, SetVariable, LoadLibraryDLL}; AddOpToCache(internalOps); }
/// <summary> /// Add an opcode to the cache. /// </summary> /// <param name="pointer">Opcode pointer to add.</param> private void AddOpToCache(OpCodePointer pointer) { var newItem = new OpCodeItem { Pointer = pointer, Attribute = pointer.Method.GetCustomAttributes(typeof(OpCodeAttribute), false).FirstOrDefault() as OpCodeAttribute }; AddOpToCache(newItem); }