protected override void OnLoaded() { base.OnLoaded(); var noesisService = Application.Current.Container.Resolve <NoesisService>(); if (noesisService == null) { noesisService = new NoesisService() { Style = null, }; Application.Current.Container.RegisterInstance(noesisService); } }
public MyApplication() { this.Container.RegisterType <Clock>(); this.Container.RegisterType <TimerFactory>(); this.Container.RegisterType <Random>(); this.Container.RegisterType <ErrorHandler>(); this.Container.RegisterType <ScreenContextManager>(); this.Container.RegisterType <GraphicsPresenter>(); this.Container.RegisterType <AssetsDirectory>(); this.Container.RegisterType <AssetsService>(); this.Container.RegisterType <ForegroundTaskSchedulerService>(); this.Container.RegisterType <WorkActionScheduler>(); var noesisService = new NoesisService(); this.Container.RegisterInstance(noesisService); this.Container.RegisterType <DemoCommandService>(); ForegroundTaskScheduler.Foreground.Configure(this.Container); BackgroundTaskScheduler.Background.Configure(this.Container); }