protected override void Configure() { _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container.PerRequest <MainPageViewModel>(); _container.RegisterSingleton(typeof(IPageNavigationService), "IPageNavigationService", typeof(PageNavigationService)); _container.RegisterSingleton(typeof(IUserNotificationService), "IUserNotificationService", typeof(UserNotificationService)); }
protected override void Configure() { LogManager.GetLog = t => new DebugLog(t); _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container.RegisterPerRequest(typeof(IMessageService), null, typeof(DefaultMessageService)); _container.RegisterInstance(typeof(IResourceLoader), null, new DefaultResourceLoader()); _container.RegisterSingleton(typeof(IGitHubService), null, typeof(GhService)); _container .PerRequest <MainViewModel>() .PerRequest <NewsViewModel>() .PerRequest <RepositoriesViewModel>() .PerRequest <FollowersViewModel>() .PerRequest <FollowingViewModel>() .PerRequest <OrgsListViewModel>() .PerRequest <RepositoryViewModel>() .PerRequest <RepositoryCommitsViewModel>() .PerRequest <RepositoryIssuesViewModel>() .PerRequest <RepositoryInfoViewModel>() .PerRequest <RepositoryContentsViewModel>() .PerRequest <OrgViewModel>() .PerRequest <MembersViewModel>() .PerRequest <AboutViewModel>() .PerRequest <AuthorizeViewModel>() .PerRequest <HtmlUrlViewModel>(); }
protected override void Configure() { base.Configure(); _container = new WinRTContainer(RootFrame); _container.RegisterWinRTServices(); _container.RegisterSingleton(typeof(IUiService), null, typeof(UiService)); }
protected override void Configure() { MessageBinder.SpecialValues.Add("$clickeditem", c => ((ItemClickEventArgs)c.EventArgs).ClickedItem); container = new WinRTContainer(); container.RegisterWinRTServices(); container.PerRequest <MainViewModel>(); container.RegisterSingleton(typeof(IDialogService), null, typeof(DialogService)); PrepareViewFirst(); }
protected override void Configure() { // This configures the framework to map between MainViewModel and MainPage // Normally it would map between MainPageViewModel and MainPage var config = new TypeMappingConfiguration { IncludeViewSuffixInViewModelNames = false }; ViewLocator.ConfigureTypeMappings(config); ViewModelLocator.ConfigureTypeMappings(config); _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container.RegisterSingleton(typeof(MongoService), "MongoService", typeof(MongoService)); _container.RegisterPerRequest(typeof(PreviousConnectionsService), "PreviousConnectionsService", typeof(PreviousConnectionsService)); _container.PerRequest <ShellViewModel>(); _container.PerRequest <MainViewModel>(); _container.PerRequest <DatabasesViewModel>(); _container.PerRequest <SettingsViewModel>(); }
protected override void Configure() { base.Configure(); // create the container _container = new WinRTContainer(); _container.RegisterWinRTServices(); // repositories _container.RegisterSingleton(typeof(ISessionRepository), null, typeof(JsonSessionRepository)); _container.RegisterSingleton(typeof(ISpeakerRepository), null, typeof(JsonSpeakerRepository)); _container.RegisterSingleton(typeof(IChangeRepository), null, typeof(JsonChangeRepository)); _container.RegisterSingleton(typeof(ISettingsRepository), null, typeof(ApplicationSettingsRepository)); // non frame services _container.RegisterSingleton(typeof(IAppService), null, typeof(CodemashApplicationService)); _container.RegisterSingleton(typeof(INotificationRegistrationService), null, typeof(CodemashNotificationRegistrationService)); }