mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-08 13:49:11 +00:00
[PR #941] Feat: Add Electron.NET startup lifecycle events #1376
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/ElectronNET/Electron.NET/pull/941
State: closed
Merged: No
This PR introduces support for multiple startup/shutdown callbacks to improve initialization control.
Previously, we only had
OnAppReady, which runs too late for some features like protocol registration.Now this supports:
OnBeforeReady→ runs before Electron'sready(useful for protocol setup)OnReady→ same as currentOnAppReadyOnWillQuit→ triggered when shutdown startsOnQuit→ after everything is fully stoppedAlso added:
UseElectronoverload with optionsRuntimeControllerAspNetBaseto call the new eventsThis is an initial implementation and can be adjusted later based on feedback. Let me know if you'd like to change event order, naming, or extend it further.