2020-05-16 21:31:44 +01:00
|
|
|
using System;
|
2020-05-18 10:39:01 +01:00
|
|
|
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;
|
2020-05-18 10:39:01 +01:00
|
|
|
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
|
|
|
|
{
|
2020-05-18 10:39:01 +01:00
|
|
|
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>
|
2020-05-18 10:39:01 +01:00
|
|
|
/// 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>
|
2020-05-18 10:39:01 +01:00
|
|
|
public App()
|
2020-05-16 21:31:44 +01:00
|
|
|
{
|
2020-05-18 10:39:01 +01:00
|
|
|
InitializeComponent();
|
|
|
|
}
|
2020-05-16 21:31:44 +01:00
|
|
|
|
2020-05-18 10:39:01 +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-18 10:39:01 +01:00
|
|
|
}
|
2020-05-16 21:31:44 +01:00
|
|
|
}
|