private static void OnLauncherButtonClicked(object sender, EventArgs e) { Button button = sender as Button; string name = button.StyleId; Device.BeginInvokeOnMainThread(() => CrossLogger.Current.Debug("Launcher", "Button ID: '" + button.Id.ToString() + "', URL: '" + name + "'")); IAppLauncher appLauncher = DependencyService.Get <IAppLauncher>(); appLauncher.Launch(name); }
static void Main(string[] args) { IAppLauncher appLauncher = Startup .ConfigureServices() .GetService <IAppLauncher>(); //Setup infrastructure appLauncher.Launch(); //Start the process Startup.DisposeServices(); //Release resources Console.Read(); //Wait to verify results }