protected override void Configure() { container = new PhoneContainer(this); container.RegisterPerRequest(typeof(IRealtimeStopVisitsService), null, typeof(RealtimeStopVisitsService)); container.RegisterPerRequest(typeof(IRealtimeStopsService), null, typeof(RealtimeStopsService)); container.RegisterPerRequest(typeof(StopsViewViewModel), "StopsViewModel", typeof(StopsViewViewModel)); container.RegisterPerRequest(typeof(RealtimeResultsViewModel), "RealtimeResultsViewModel", typeof(RealtimeResultsViewModel)); container.RegisterInstance(typeof(INavigationService), null, new FrameAdapter(RootFrame)); }
protected override void Configure() { container = new PhoneContainer(); container.RegisterPhoneServices(RootFrame); foreach (var vm in App.GetViewModelTypes()) container.RegisterPerRequest(vm, null, vm); AddCustomConventions(); }
protected override void Configure() { container = new PhoneContainer(RootFrame); container.Singleton<IEventAggregator, EventAggregator>(); container.PerRequest<HelpPageViewModel>(); container.PerRequest<PresetsPageViewModel>(); container.PerRequest<PresetViewModel>(); container.PerRequest<SavedFilesViewModel>(); container.PerRequest<MainMenuPageViewModel>(); container.PerRequest<MainPageViewModel>(); container.Handler<ISettings>(simpleContainer => new Settings(IsolatedStorageSettings.ApplicationSettings)); container.PerRequest<SettingsPageViewModel>(); container.PerRequest<HearingTestViewModel>(); container.PerRequest<HostPageViewModel>(); container.PerRequest<HearingTestView>(); container.PerRequest<RecentPageViewModel>(); container.PerRequest<IAudiogramPlot, AudiogramPlot>(); container.PerRequest<BrowserPageViewModel>(); container.PerRequest<DataViewModel>(); container.PerRequest<PlotViewModel>(); container.Handler<IStorageFolder>(simpleContainer => ApplicationData.Current.LocalFolder); container.PerRequest<IAsyncXmlFileManager, AsyncXmlFileManager>(); container.Handler<ISkyDriveUpload>( simpleContainer => new SkyDriveUpload((IStorageFolder) simpleContainer.GetInstance(typeof (IStorageFolder), null), (ISettings) simpleContainer.GetInstance(typeof (ISettings), null))); container.PerRequest<ResultsPageViewModel>(); container.RegisterPerRequest(typeof(AddItemViewModel), "AddItemViewModel", typeof(AddItemViewModel)); container.RegisterPerRequest(typeof(SaveResultViewModel), "SaveResultViewModel", typeof(SaveResultViewModel)); container.PerRequest<IDialogBuilder<AddItemView, AddItemViewModel>, DialogBuilder<AddItemView, AddItemViewModel>>(); container.PerRequest<IDialogBuilder<SaveResultView, SaveResultViewModel>, DialogBuilder<SaveResultView, SaveResultViewModel>>(); container.Handler<IOscillator>(simpleContainer => new SineOscillator(-95, 100)); container.Handler<IPitchGenerator>( simpleContainer => new PitchGenerator((IOscillator) simpleContainer.GetInstance(typeof (IOscillator), null))); container.RegisterPhoneServices(); AddDefaultSettings(); AddConventions(); }
protected override void Configure() { _container = new PhoneContainer(); if (!Execute.InDesignMode) _container.RegisterPhoneServices(RootFrame); _container.PerRequest<LoginViewModel>(); _container.PerRequest<UserFactsViewModel>(); _container.PerRequest<ExtendedSplashViewModel>(); _container.PerRequest<DashboardViewModel>(); _container.PerRequest<CodeFactsViewModel>(); _container.PerRequest<DaysOnFireViewModel>(); _container.PerRequest<HomeViewModel>(); _container.RegisterPerRequest(typeof(IWebClient), "WebClient", typeof(WebClient)); _container.RegisterPerRequest(typeof(IUserDataService), "UserDataService", typeof(UserDataService)); _container.RegisterSingleton(typeof(IPageNavigationService), "PageNavigationService", typeof(PageNavigationService)); _container.RegisterPerRequest(typeof(IAppRepository), "AppRepository", typeof(AppRepository)); _container.RegisterPerRequest(typeof(IUserNotificationService), "UserNotificationService", typeof(UserNotificationService)); AddCustomConventions(); }
protected override void Configure() { if (Execute.InDesignMode) return; container = new PhoneContainer(); container.RegisterPhoneServices(RootFrame); container.PerRequest<MainPageViewModel>(); container.PerRequest<DownloaderPageViewModel>(); container.PerRequest<AboutPageViewModel>(); container.RegisterSingleton(typeof(EventAggregator), null, typeof(EventAggregator)); container.RegisterPerRequest(typeof(DownloadHelper), null, typeof(DownloadHelper)); container.RegisterPerRequest(typeof(MessageToHandle), null, typeof(MessageToHandle)); container.RegisterPerRequest(typeof(MessageToHandle), null, typeof(ShareHelper)); AddCustomConventions(); PhoneService.Activated += new EventHandler<ActivatedEventArgs>(PhoneService_Activated); PhoneService.Launching += new EventHandler<LaunchingEventArgs>(PhoneService_Launching); }
protected override void Configure() { container = new PhoneContainer(); #if DEBUG LogManager.GetLog = type => new DebugLogger(type); #endif container.RegisterPhoneServices(RootFrame); var initTasks = new Task(() => PerformAsyncInitializationsAsync()); initTasks.RunSynchronously(); container.RegisterPerRequest(typeof(IConfigurationService), null, typeof(DefaultConfigurationService)); container.RegisterPerRequest(typeof(IDataService), null, typeof(DefaultDataService)); container.RegisterPerRequest(typeof(ILocationService), null, typeof(DefaultLocationService)); container.RegisterPerRequest(typeof(IUIService), null, typeof(DefaultUIService)); // container.RegisterPerRequest(typeof(IEchtzeitdatenService), null, typeof(CreateCampEchtzeitdatenService)); container.RegisterPerRequest(typeof(IEchtzeitdatenService), null, typeof(OgdEchtzeitdatenService)); container.RegisterPerRequest(typeof(IRoutingService), null, typeof(OgdRoutingService)); container.PerRequest<MainPageViewModel>(); container.PerRequest<MenuViewModel>(); container.PerRequest<TrafficInfoViewModel>(); container.PerRequest<FavoritesViewModel>(); container.PerRequest<StationsPivotPageViewModel>(); container.PerRequest<StationsListViewModel>(); container.PerRequest<StationsSearchViewModel>(); container.PerRequest<NearbyStationsViewModel>(); container.PerRequest<LinesPivotPageViewModel>(); container.PerRequest<MetroViewModel>(); container.PerRequest<TramViewModel>(); container.PerRequest<BusViewModel>(); container.PerRequest<NightBusViewModel>(); container.PerRequest<LineInfoPageViewModel>(); container.PerRequest<MapNearbyStationsPageViewModel>(); container.PerRequest<StationInfoPivotPageViewModel>(); container.PerRequest<DepartureViewModel>(); container.PerRequest<RoutingPageViewModel>(); container.PerRequest<NewRouteViewModel>(); container.PerRequest<StationSelectorViewModel>(); container.PerRequest<RouteHistoryViewModel>(); container.PerRequest<TripsViewModel>(); container.PerRequest<SettingsPageViewModel>(); container.PerRequest<AboutPageViewModel>(); AddCustomConventions(); }
protected override void Configure() { container = new PhoneContainer(); #if DEBUG LogManager.GetLog = type => new DebugLogger(type); #endif if (!Execute.InDesignMode) { container.RegisterPhoneServices(RootFrame); } PerformAsyncInitializationsAsync().GetAwaiter().GetResult(); // Application Insights: http://msdn.microsoft.com/en-us/library/dn481095.aspx container.RegisterPerRequest(typeof(IConfigurationService), null, typeof(DefaultConfigurationService)); container.RegisterPerRequest(typeof(IDataService), null, typeof(DefaultDataService)); container.RegisterPerRequest(typeof(ILocationService), null, typeof(DefaultLocationService)); container.RegisterPerRequest(typeof(IUIService), null, typeof(DefaultUIService)); container.RegisterPerRequest(typeof(IEchtzeitdatenService), null, typeof(OgdEchtzeitdatenService)); container.RegisterPerRequest(typeof(IRoutingService), null, typeof(OgdRoutingService)); container.PerRequest<MainPageViewModel>(); container.PerRequest<MenuViewModel>(); container.PerRequest<TrafficInfoViewModel>(); container.PerRequest<FavoritesViewModel>(); container.PerRequest<StationsPivotPageViewModel>(); container.PerRequest<StationsListViewModel>(); container.PerRequest<StationsSearchViewModel>(); container.PerRequest<NearbyStationsViewModel>(); container.PerRequest<LinesPivotPageViewModel>(); container.PerRequest<MetroViewModel>(); container.PerRequest<TramViewModel>(); container.PerRequest<BusViewModel>(); container.PerRequest<NightBusViewModel>(); container.PerRequest<LineInfoPageViewModel>(); container.PerRequest<MapNearbyStationsPageViewModel>(); container.PerRequest<StationInfoPivotPageViewModel>(); container.PerRequest<DepartureViewModel>(); container.PerRequest<RoutingPageViewModel>(); container.PerRequest<NewRouteViewModel>(); container.PerRequest<StationSelectorViewModel>(); container.PerRequest<RouteHistoryViewModel>(); container.PerRequest<TripsViewModel>(); container.PerRequest<SettingsPageViewModel>(); container.PerRequest<AboutPageViewModel>(); AddCustomConventions(); }