public App(IPlatformRegistrar platformRegistrar) { InitializeComponent(); var composition = new CompositionRoot(platformRegistrar); MainPage = (NavigationView)composition.StartPage <NavigationRootViewModel>(); }
// TODO: [rlittlesii: July 03, 2020] Move more towards pure DI. public CompositionRoot(IPlatformRegistrar registrar) { RxApp.DefaultExceptionHandler = new ShowroomExceptionHandler(); Locator.CurrentMutable.InitializeReactiveUI(); Sextant.Sextant.Instance.InitializeForms(); Locator .CurrentMutable .RegisterPlatform(registrar); Locator.CurrentMutable.UseSerilogFullLogger(Log.Logger); RegisterServices(Locator.CurrentMutable); RegisterViews(Locator.CurrentMutable); RegisterViewModels(Locator.GetLocator()); }
// TODO: [rlittlesii: July 03, 2020] Move more towards pure DI. public CompositionRoot(IPlatformRegistrar registrar) { RxApp.DefaultExceptionHandler = new ShowroomExceptionHandler(); Locator.CurrentMutable.InitializeReactiveUI(); Sextant.Sextant.Instance.InitializeForms(); Locator .CurrentMutable .RegisterPlatform(registrar) .RegisterNavigationView(() => new NavigationView(RxApp.MainThreadScheduler, RxApp.TaskpoolScheduler, ViewLocator.Current)) .RegisterParameterViewStackService() .UseSerilogFullLogger(Log.Logger); RegisterServices(Locator.GetLocator()); RegisterViews(Locator.GetLocator()); RegisterViewModels(Locator.GetLocator()); }
public static IMutableDependencyResolver RegisterPlatform(this IMutableDependencyResolver mutableDependencyResolver, IPlatformRegistrar platformRegistrar) { platformRegistrar.RegisterPlatform(mutableDependencyResolver); return(mutableDependencyResolver); }
public ApplicationFixture WithPlatformRegistration(IPlatformRegistrar registrar) => this.With(ref _platformRegistrar, registrar);
public ApplicationMock(IPlatformRegistrar platformRegistrar) : base(platformRegistrar) { _platformRegistrar = platformRegistrar; }
/// <summary> /// Register the platform services. /// </summary> /// <param name="registrar">The registrar.</param> protected virtual void RegisterPlatformServices(IPlatformRegistrar registrar) => registrar?.RegisterPlatformServices(_container);