Exemple #1
0
 public void Undo()
 {
     _Detour.Undo();
     if (!IsValid)
     {
         _Free();
     }
 }
Exemple #2
0
        public void Undo()
        {
            if (!IsValid)
            {
                throw new InvalidOperationException("This hook has been undone.");
            }

            _Detour.Undo();
            if (!IsValid)
            {
                _Free();
            }
        }
Exemple #3
0
        public void Undo()
        {
            if (!(OnUndo?.InvokeWhileTrue(this) ?? true))
            {
                return;
            }

            _Detour.Undo();
            if (!IsValid)
            {
                _Free();
            }
        }
Exemple #4
0
        public void Undo()
        {
            if (!IsValid)
            {
                throw new ObjectDisposedException(nameof(Hook));
            }

            if (IsApplied && !(OnUndo?.InvokeWhileTrue(this) ?? true))
            {
                return;
            }

            _Detour.Undo();
            if (!IsValid)
            {
                _Free();
            }
        }