Emul8.Peripherals.CPU.TranslationCPU.RemoveHook C# (CSharp) Method

RemoveHook() public method

public RemoveHook ( uint addr, Action hook ) : void
addr uint
hook Action
return void
        public void RemoveHook(uint addr, Action<uint> hook)
        {
            lock(hooks)
            {
                HookDescriptor descriptor;
                if(!hooks.TryGetValue(addr, out descriptor) || !descriptor.RemoveCallback(hook))
                {
                    this.Log(LogLevel.Warning, "Tried to remove not existing hook from address 0x{0:x}", addr);
                    return;
                }
                if(descriptor.IsEmpty)
                {
                    hooks.Remove(addr);
                }
            }
        }
TranslationCPU