Spotify.NET/SpotifyAPI.Web.Examples/Example.UWP/App.xaml.cs

43 lines
1.2 KiB
C#
Raw Normal View History

2020-05-16 21:31:44 +01:00
using System;
using MvvmCross;
using MvvmCross.Platforms.Uap.Core;
using MvvmCross.Platforms.Uap.Views;
2020-05-16 21:31:44 +01:00
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.UI.Popups;
2020-05-16 21:31:44 +01:00
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
namespace Example.UWP
{
public abstract class ExampleApp : MvxApplication<MvxWindowsSetup<CoreApp>, CoreApp>
{
}
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public sealed partial class App
{
2020-05-16 21:31:44 +01:00
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
2020-05-16 21:31:44 +01:00
/// </summary>
public App()
2020-05-16 21:31:44 +01:00
{
InitializeComponent();
}
2020-05-16 21:31:44 +01:00
protected override void OnActivated(IActivatedEventArgs args)
{
if (args.Kind == ActivationKind.Protocol)
{
ProtocolActivatedEventArgs eventArgs = args as ProtocolActivatedEventArgs;
var publisher = Mvx.IoCProvider.Resolve<ITokenPublisherService>();
publisher.ReceiveToken(eventArgs.Uri);
}
2020-05-16 21:31:44 +01:00
}
}
2020-05-16 21:31:44 +01:00
}