public interface IDesktopLoginStartup Starting the application when the user logs in. Nothing is registered until IDesktopLoginStartup.EnableAsync is called, which an application does only when the user asks for it.
Methods
DisableAsync
ValueTask<PlatformResult<PlatformUnit>> DisableAsync(CancellationToken cancellationToken = default) Stops starting the application at login and removes what IDesktopLoginStartup.EnableAsync registered.
Remarks
It also forgets that the user turned the entry off, so a later IDesktopLoginStartup.EnableAsync registers it again.
EnableAsync
ValueTask<PlatformResult<PlatformUnit>> EnableAsync(LoginStartupRequest request, CancellationToken cancellationToken = default) Starts the application at login with request, replacing an earlier registration.
Remarks
PlatformFailureCode.PermissionDenied when the user or the desktop refused, including a startup entry the user turned off in the desktop's own settings, which the application does not override.
IsEnabledAsync
ValueTask<PlatformResult<bool>> IsEnabledAsync(CancellationToken cancellationToken = default) Whether the application starts at login.
Remarks
Unavailable where the platform cannot tell, such as a Flatpak or Snap sandbox on Linux.