Mobile/CafeLib.Mobile/Extensions/ApplicationExtensions.cs
/// <summary>
/// Start application on view model.
/// </summary>
/// <typeparam name="T">view model type</typeparam>
/// <param name="app">application</param>
Start application on view model.
Start application on view model .
public static void StartOnViewModel<T>(this Application app) where T : BaseViewModel
        {
            var vm = app.Resolve<T>();
            app.MainPage = new NavigationPage(vm.ResolvePage());
            app.GetDeviceService().RunOnMainThread(async () => await vm.Initiate());
        }
public static void StartOnViewModel < T > ( this Application app ) where T : BaseViewModel { var vm = app . Resolve < T > ( ) ; app . MainPage = new NavigationPage ( vm . ResolvePage ( ) ) ; app . GetDeviceService ( ) . RunOnMainThread ( async ( ) => await vm . Initiate ( ) ) ; }
Start application on view model.
Start application on view model .
Application
this
<not_specific>
app
<not_specific>
None
typeparam
view model type
view model type