Skip to content

Instantly share code, notes, and snippets.

@rdelrosario
Created May 10, 2022 02:16
Show Gist options
  • Save rdelrosario/c36263889ef7b8313a659c739f68fc11 to your computer and use it in GitHub Desktop.
Save rdelrosario/c36263889ef7b8313a659c739f68fc11 to your computer and use it in GitHub Desktop.
public abstract class StartupPage : ContentPage, IStartupTask
{
...
async Task<IStartupTaskParameters> IStartupTask.RunAsync(IStartupTaskParameters parameters)
{
_tcs = new TaskCompletionSource<IStartupTaskParameters>();
await OnStartAsync(parameters);
await App.Current.MainPage.Navigation.PushModalAsync(this);
return await _tcs.Task;
}
private TaskCompletionSource<IStartupTaskParameters> _tcs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment