async void StateChanged(object sender, MvxSetup.MvxSetupStateEventArgs e) { if (e.SetupState == MvxSetup.MvxSetupState.Initialized) { await Mvx.Resolve <ITrackFacade>().Initialize(); _setup.StateChanged -= StateChanged; _setup = null; } }
async void StateChanged(object sender, MvxSetup.MvxSetupStateEventArgs e) { if (e.SetupState == MvxSetup.MvxSetupState.Initialized) { await Mvx.Resolve <ITrackFacade>().CheckAreWeStillOnTheRoadAsync(); await Mvx.Resolve <ITrackFacade>().InitializeAsync(); _setup.StateChanged -= StateChanged; _setup = null; } }
public static void Initialize() { if (!IsInDesignTime) { return; } if (MvxSingleton <IMvxIoCProvider> .Instance == null) { var iocProvider = MvxIoCProvider.Initialize(); Mvx.IoCProvider.RegisterSingleton(iocProvider); } MvxSetup.RegisterSetupType <MvxWpfSetup <App> >(System.Reflection.Assembly.GetExecutingAssembly()); var instance = MvxWpfSetupSingleton.EnsureSingletonAvailable(Application.Current.Dispatcher, new Content()); }
public SplashScreen() : base(Resource.Layout.SplashScreen) { MvxSetup.RegisterSetupType <Setup>(this.GetType().Assembly); }
public static void InstallShiny(this MvxSetup setup) { ShinyHost.Populate((serviceType, func, lifetime) => Mvx.IoCProvider.RegisterType(serviceType, func) ); }
public App(MvxSetup setup) { _setup = setup; _setup.StateChanged += StateChanged; }