Init commit

This commit is contained in:
Jeddunk 2021-01-08 18:36:57 +01:00
commit 0c711f7da6
26 changed files with 1733 additions and 0 deletions

View file

@ -0,0 +1,29 @@
using System;
using System.Threading.Tasks;
using MvvmCross.Exceptions;
using MvvmCross.Navigation;
using MvvmCross.ViewModels;
namespace GoldbergGUI.Core.Utils
{
// ReSharper disable once ClassNeverInstantiated.Global
public class CustomMvxAppStart<TViewModel> : MvxAppStart<TViewModel> where TViewModel : IMvxViewModel
{
public CustomMvxAppStart(IMvxApplication application, IMvxNavigationService navigationService) : base(application, navigationService)
{
}
protected override async Task NavigateToFirstViewModel(object hint = null)
{
//return base.NavigateToFirstViewModel(hint);
try
{
await NavigationService.Navigate<TViewModel>().ConfigureAwait(false);
}
catch (System.Exception exception)
{
throw exception.MvxWrap("Problem navigating to ViewModel {0}", typeof(TViewModel).Name);
}
}
}
}