private static bool TryGetNewPath(string oldFilePath, out string newFilePath) { oldFilePath = oldFilePath.TrimStart(_prefix); if (!String.IsNullOrEmpty(oldFilePath)) { oldFilePath = Path.GetFullPath(oldFilePath); // Get redirected path. if (_redirectorController.Loading != null) { _ntCreateFileHook.Disable(); _redirectorController.Loading.Invoke(oldFilePath); _ntCreateFileHook.Enable(); } if (_redirector.TryRedirect(oldFilePath, out newFilePath)) { string newPath = newFilePath; if (_redirectorController.Redirecting != null) { _ntCreateFileHook.Disable(); _redirectorController.Redirecting.Invoke(oldFilePath, newPath); _ntCreateFileHook.Enable(); } return(true); } } newFilePath = oldFilePath; return(false); }
/// <summary> /// Disables the state tracker. /// </summary> public void Disable() { _onTitleSequenceHook.Disable(); _onRaceHook.Disable(); _onCharaSelectHook.Disable(); _onCourseSelectHook.Disable(); _onRaceSettingsHook.Disable(); _messageBoxHook.Disable(); }
/* Loader API */ public void Disable() { _loadHAnimationHook.Disable(); _loadClumpHook.Disable(); _loadTextureDictionaryHook.Disable(); _loadSplineHook.Disable(); _loadDeltaMorphHook.Disable(); _loadWorldHook.Disable(); _loadUvAnimHook.Disable(); _loadMaestroHook.Disable(); _loadCameraTmbHook.Disable(); }
public void TestHookMul() { int Hookfunction01(int a, int b) { return(_multiplyHook01.OriginalFunction(a, b) * MultiplyConstant); } int Hookfunction02(int a, int b) { return(_multiplyHook02.OriginalFunction(a, b) * MultiplyConstant); } _multiplyHook01 = new Hook <Calculator.MultiplyFunction>(Hookfunction01, (long)_calculator.Multiply).Activate(); _multiplyHook02 = new Hook <Calculator.MultiplyFunction>(Hookfunction02, (long)_calculator.Multiply).Activate(); // 11, 10, 01, 00 labels below represent hook enable states. First bit is _multiplyHook01, second is _multiplyHook02. // 01, 10: Common test. // 11 AssertTwoHooksEnabled(); // 10 _multiplyHook01.Disable(); _multiplyHook02.Enable(); AssertOneHookEnabled(); // 01 _multiplyHook01.Enable(); _multiplyHook02.Disable(); AssertOneHookEnabled(); // 00 _multiplyHook01.Disable(); _multiplyHook02.Disable(); AssertZeroHooksEnabled(); }
public void Suspend() { mEmulatorCtorHook.Disable(); }
private void DisableRedirectionHooks() { _createFileHook.Disable(); _readFileHook.Disable(); _getFileSizeHook.Disable(); }
public void Disable() { _presentHook?.Disable(); _resizeBuffersHook?.Disable(); }
public void Suspend() { _charaSelectHook.Disable(); _titleHook.Disable(); }
public void Suspend() => _optimizeHook.Disable();
public void Detach(IHook hook) { hook.Disable(_window); _hooks.Remove(hook); }
public override void Suspend() { mAppUpdateExHook.Disable(); }
public void Disable() { _endSceneHook.Disable(); _resetHook.Disable(); _releaseHook.Disable(); }
/// <summary> /// Disables the hooks. /// </summary> public void Suspend() { _psPadServerHook.Disable(); _periMakeRepeatCountHook.Disable(); }