/// <summary> /// Called before the application shuts down. /// </summary> public async Task DisposeAsync() { Window.Current.CoreWindow.Dispatcher.AcceleratorKeyActivated -= OnAcceleratorKeyActivated; await RootView.StopReactApplicationAsync(); await _reactInstanceManager.DisposeAsync(); }
/// <summary> /// Called before the application shuts down. /// </summary> public async Task DisposeAsync() { RootView?.RemoveHandler(Keyboard.KeyDownEvent, (KeyEventHandler)OnAcceleratorKeyActivated); if (_reactInstanceManager.IsValueCreated) { await ReactInstanceManager.DisposeAsync().ConfigureAwait(false); } }
/// <summary> /// Dispose the current instance and release the reference to it. /// </summary> /// <returns> /// A task to await the dispose operation. /// </returns> public async Task DisposeAsync() { if (_reactInstanceManager != null) { await _reactInstanceManager.DisposeAsync(); _reactInstanceManager = null; } }
/// <summary> /// Called before the application shuts down. /// </summary> public Task DisposeAsync() { Window.Current.CoreWindow.Dispatcher.AcceleratorKeyActivated -= OnAcceleratorKeyActivated; return(_reactInstanceManager.DisposeAsync()); }