private void RegisterViewModels() { _container.PerRequest <MainScreenViewModel>(); _container.PerRequest <MainContentViewModel>() .PerRequest <AllViewModel>() .PerRequest <ItemViewModel>(); }
protected override void Configure() { container = new WinRTContainer(); container.RegisterWinRTServices(); container.PerRequest <ITalao, Talao>(); container.PerRequest <IMultasRealizadas, MultasRealizadas>(); }
public override void ConfigureContainer(WinRTContainer container) { container .PerRequest <LoggedOutApplicationMode>() .PerRequest <LoggedInApplicationMode>(); container .Singleton <ICentronService, CentronService>() .Singleton <IHelpdeskGroupsService, HelpdeskGroupsService>() .Singleton <IQueryExecutor, QueryExecutor>() .Singleton <IQueryCache, QueryCache>() .Singleton <ICommandQueue, CommandQueue>() .Singleton <IScriptEngine, ScriptEngine>(); container .PerRequest <IQueryHandler <HelpdeskGroupQuery, IList <HelpdeskPreview> >, HelpdeskGroupQueryHandler>() .PerRequest <IQueryHandler <SearchCustomersQuery, IList <CustomerPreview> >, SearchCustomersQueryHandler>() .PerRequest <IQueryHandler <HelpdeskTypesQuery, IList <HelpdeskType> >, HelpdeskTypesQueryHandler>() .PerRequest <IQueryHandler <HelpdeskStatesQuery, IList <HelpdeskState> >, HelpdeskStatesQueryHandler>(); container .PerRequest <ICommandHandler <ChangeHelpdeskStateCommand, Unit>, ChangeHelpdeskStateCommandHandler>(); var scriptEngine = container.GetInstance <IScriptEngine>(); scriptEngine.AddGlobalMethod("contains", (Func <string, string, bool>)((s1, s2) => (s1 ?? string.Empty).IndexOf(s2, StringComparison.OrdinalIgnoreCase) >= 0)); }
protected override void Configure() { _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container.Singleton <IWeatherService, WeatherService>(); _container.Singleton <IWeatherProvider, WeatherProvider>(); _container.Singleton <AppNavigationService>(); _container.Singleton <IInteractionService, InteractionService>(); _container.Handler <IAppNavigationService>(cnt => cnt.GetInstance <AppNavigationService>()); _container.PerRequest <ShellViewModel>(); _container.PerRequest <HomeViewModel>(); _container.PerRequest <SecondPageViewModel>(); _container.PerRequest <ThirdPageViewModel>(); var config = new TypeMappingConfiguration { DefaultSubNamespaceForViews = "Weather.UWP.Views", DefaultSubNamespaceForViewModels = "Weather.Core.ViewModels" }; ViewLocator.ConfigureTypeMappings(config); ViewModelLocator.ConfigureTypeMappings(config); }
protected override void Configure() { _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container.PerRequest <MainViewModel>(); _container.PerRequest <AboutViewModel>(); _container.PerRequest <AugmentedViewModel>(); _container.PerRequest <CurrentMapViewModel>(); _container.PerRequest <LocationListViewModel>(); _container.PerRequest <SignUpViewModel>(); _container.PerRequest <SignInViewModel>(); _container.PerRequest <ResetPasswordViewModel>(); _container.PerRequest <AddPointOfInterestViewModel>(); _container.PerRequest <CreatePointOfInterestViewModel>(); _container.Singleton <IPointOfInterestService, PointOfInterestService>(); _container.Singleton <ILocationService, LocationService>(); _container.Singleton <IAccountService, AccountService>(); _container.Singleton <IHttpService, HttpService>(); _container.Singleton <IUserDataStorageService, UserDataStorageService>(); IoC.GetInstance = GetInstance; HideStatusBar(); }
protected override void Configure() { _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container.Singleton <INotesService, NotesService>(); _container.Singleton <INotesProvider, NotesProvider>(); _container.Singleton <ILocalStorage, LocalStorage>(); _container.Singleton <AppNavigationService>(); _container.Singleton <IInteractionService, InteractionService>(); _container.Handler <IAppNavigationService>(cnt => cnt.GetInstance <AppNavigationService>()); _container.PerRequest <ShellViewModel>(); _container.PerRequest <ShowNotesViewModel>(); _container.PerRequest <CreateNoteViewModel>(); _container.PerRequest <FavoriteNotesViewModel>(); var config = new TypeMappingConfiguration { DefaultSubNamespaceForViews = "Notes.Views", DefaultSubNamespaceForViewModels = "Notes.Core.ViewModels" }; ViewLocator.ConfigureTypeMappings(config); ViewModelLocator.ConfigureTypeMappings(config); }
protected override void Configure() { _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container.PerRequest <IRssService, RssService>(); _container.PerRequest <MainViewModel>(); }
protected override void Configure() { container = new WinRTContainer(); container.RegisterWinRTServices(); container.PerRequest <MainPageViewModel>(); container.PerRequest <DetailPageViewModel>(); }
protected override void Configure() { _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container.PerRequest<MainPageViewModel>(); _container.PerRequest<CategoryDetailViewModel>(); _container.Singleton<ICategoriesService, CategoriesService>(); }
protected override void Configure() { _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container.PerRequest <MainViewModel>(); _container.PerRequest <DatasheetViewModel>(); SettingsPane.GetForCurrentView().CommandsRequested += SettingCommandsRequested; }
protected override void Configure() { base.Configure(); container = new WinRTContainer(RootFrame); container.RegisterWinRTServices(); container.PerRequest <SettingsViewModel>(); container.PerRequest <DialogViewModel>(); }
private void RegisterViewModels() { container = new WinRTContainer(); container.RegisterWinRTServices(); container.PerRequest <LoginPageViewModel>(); container.PerRequest <MenuPageViewModel>(); container.PerRequest <TravelingPageViewModel>(); container.PerRequest <ViaggioSelectionPageViewModel>(); }
protected override void Configure() { container = new WinRTContainer(); container.RegisterWinRTServices(); MessageBinder.SpecialValues.Add("$clickeditem", c => ((ItemClickEventArgs)c.EventArgs).ClickedItem); container.PerRequest <MainPageViewModel>(); container.PerRequest <DetailPageViewModel>(); }
protected override void Configure() { container = new WinRTContainer(); container.RegisterWinRTServices(); container.RegisterSharingService(); container.PerRequest <TestApp.RT.AppViewModel>(); container.PerRequest <FileExplorer.Views.FileListView>(); //TODO: Register your view models at the container }
protected override void Configure() { container = new WinRTContainer(); container.RegisterWinRTServices(); container.PerRequest <HomeViewModel>(); container.PerRequest <CommentThreadViewModel>(); container.Singleton <IAnalytics, Analytics>(); container.Singleton <ICrashReporter, NullCrashReporter>(); container.Singleton <IHackerNewsClient, HackerNewsHtmlClient>(); }
protected override void Configure() { container = new WinRTContainer(); container.RegisterWinRTServices(); container.PerRequest <MainViewModel>(); container.PerRequest <DetailViewModel>(); container.Singleton <IDataManager, DataManagerOnlinerTech>(); container.Singleton <IWriteReadData, LocalDataManager>(); MessageBinder.SpecialValues.Add("$clickeditem", c => ((ItemClickEventArgs)c.EventArgs).ClickedItem); }
protected override void Configure() { _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container.PerRequest <CitiesViewModel>(); _container.PerRequest <CityDetailsViewModel>(); _container.PerRequest <CitiesMapViewModel>(); _container.PerRequest <ShellViewModel>(); _container.PerRequest <SettingViewModel>(); // _container.PerRequest<MainViewModel>(); _container.Singleton <INavigationManager, NavigationManager>(); }
protected override void Configure() { container = new WinRTContainer(); container.RegisterWinRTServices(); container.RegisterSharingService(); container.RegisterSettingsService() .RegisterFlyoutCommand<SampleSettingsViewModel>("Custom"); container .PerRequest<ActionsViewModel>() .PerRequest<BindingsViewModel>() .PerRequest<CoroutineViewModel>() .PerRequest<ExecuteViewModel>() .PerRequest<MenuViewModel>() .PerRequest<NavigationTargetViewModel>() .PerRequest<NavigationViewModel>() .PerRequest<SampleSettingsViewModel>() .PerRequest<SearchViewModel>() .PerRequest<SettingsViewModel>() .PerRequest<SetupViewModel>() .PerRequest<ShareSourceViewModel>() .PerRequest<ShareTargetViewModel>(); }
protected override void Configure() { LogManager.GetLog = t => new DebugLog(t); container = new WinRTContainer(); container.RegisterWinRTServices(); container.RegisterSharingService(); var settingsService = container.RegisterSettingsService(); settingsService.RegisterFlyoutCommand<SampleSettingsViewModel>("Custom"); settingsService.RegisterUriCommand("View Website", new Uri("http://caliburnmicro.codeplex.com")); container .PerRequest<ActionsViewModel>() .PerRequest<BindingsViewModel>() .PerRequest<CoroutineViewModel>() .PerRequest<ExecuteViewModel>() .PerRequest<MenuViewModel>() .PerRequest<NavigationTargetViewModel>() .PerRequest<NavigationViewModel>() .PerRequest<SampleSettingsViewModel>() .PerRequest<SearchViewModel>() .PerRequest<SettingsViewModel>() .PerRequest<SetupViewModel>() .PerRequest<ShareSourceViewModel>() .PerRequest<ShareTargetViewModel>() .PerRequest<ConventionsViewModel>() .PerRequest<HubViewModel>(); // We want to use the Frame in OnLaunched so set it up here PrepareViewFirst(); }
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() { container = new WinRTContainer(); container.RegisterWinRTServices(); container.RegisterSharingService(); container.RegisterSettingsService() .RegisterFlyoutCommand <SampleSettingsViewModel>("Custom"); container .PerRequest <ActionsViewModel>() .PerRequest <BindingsViewModel>() .PerRequest <CoroutineViewModel>() .PerRequest <ExecuteViewModel>() .PerRequest <MenuViewModel>() .PerRequest <NavigationTargetViewModel>() .PerRequest <NavigationViewModel>() .PerRequest <SampleSettingsViewModel>() .PerRequest <SearchViewModel>() .PerRequest <SettingsViewModel>() .PerRequest <SetupViewModel>() .PerRequest <ShareSourceViewModel>() .PerRequest <ShareTargetViewModel>(); }
protected override void Configure() { var config = new TypeMappingConfiguration { DefaultSubNamespaceForViews = "UIUniversal.Views", DefaultSubNamespaceForViewModels = "UIUniversal.ViewModels" }; ViewLocator.ConfigureTypeMappings(config); ViewModelLocator.ConfigureTypeMappings(config); _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container.PerRequest <MainPageViewModel>(); AddCustomConventions(); var isStatusBarPresent = ApiInformation.IsTypePresent(typeof(StatusBar).ToString()); if (isStatusBarPresent) { StatusBar statusBar = StatusBar.GetForCurrentView(); // Hide the status bar statusBar.HideAsync(); } }
protected override void Configure() { var config = new TypeMappingConfiguration { DefaultSubNamespaceForViews = "Client.Views", DefaultSubNamespaceForViewModels = "Common.ViewModels" }; ViewLocator.ConfigureTypeMappings(config); ViewModelLocator.ConfigureTypeMappings(config); container = new WinRTContainer(); container.RegisterWinRTServices(); // Register the ViewModels container.PerRequest <MainViewModel>(); MessageBinder.SpecialValues.Add("$account", context => { if (context == null || context.EventArgs == null) { return(null); } return (((ItemClickEventArgs)context.EventArgs).ClickedItem as AccountViewModel); }); }
protected override void Configure() { var baseGetLog = LogManager.GetLog; LogManager.GetLog = t => t == typeof(ViewModelBinder) ? new DebugLog(t) : baseGetLog(t); ConfigureSpecialValues(); container = new WinRTContainer(); container.RegisterWinRTServices(); container .Singleton <ISchemeStorageService, SchemeStorageService>() .Singleton <IWindowManager, WindowManager>() .Singleton <IBitmapService, BitmapService>() .Singleton <ITileService, TileService>() .Singleton <IAppSettingsService, AppSettingsService>(); container .PerRequest <SchemeListViewModel>() .PerRequest <EditSchemeViewModel>(); container.RegisterSharingService(); #if WINDOWS_PHONE_APP var statusBar = StatusBar.GetForCurrentView(); statusBar.HideAsync(); #endif var tileService = container.GetInstance <ITileService>(); tileService.Initialise(); }
protected override void Configure() { _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container.Singleton <IE.Mobile.Forms.App>(); _container.PerRequest <IPlayAudio, AudioService>(); }
protected override void Configure() { LogManager.GetLog = t => new DebugLog(t); container = new WinRTContainer(); container.RegisterWinRTServices(); container.RegisterSharingService(); var settingsService = container.RegisterSettingsService(); settingsService.RegisterFlyoutCommand <SampleSettingsViewModel>("Custom"); settingsService.RegisterUriCommand("View Website", new Uri("http://caliburnmicro.codeplex.com")); container .PerRequest <ActionsViewModel>() .PerRequest <BindingsViewModel>() .PerRequest <CoroutineViewModel>() .PerRequest <ExecuteViewModel>() .PerRequest <MenuViewModel>() .PerRequest <NavigationTargetViewModel>() .PerRequest <NavigationViewModel>() .PerRequest <SampleSettingsViewModel>() .PerRequest <SearchViewModel>() .PerRequest <SettingsViewModel>() .PerRequest <SetupViewModel>() .PerRequest <ShareSourceViewModel>() .PerRequest <ShareTargetViewModel>() .PerRequest <ConventionsViewModel>() .PerRequest <HubViewModel>(); // We want to use the Frame in OnLaunched so set it up here PrepareViewFirst(); }
protected override void Configure() { ViewModelLocator.AddNamespaceMapping("Hubb.App.UWP.Views", "Hubb.Core.ViewModels"); ViewLocator.AddNamespaceMapping("Hubb.Core.ViewModels", "Hubb.App.UWP.Views"); container = new WinRTContainer(); container.RegisterWinRTServices(); container.Instance <IGitHubClient>(new GitHubClient(new ProductHeaderValue("hubb-uwp", "1.0.0"))); container .Singleton <IAppNavigationService, AppNavigationService>() .Singleton <IAuthenticationService, AuthenticationService>() .Singleton <IRepositoryService, RepositoryService>(); container .PerRequest <LoginViewModel>() .PerRequest <RepositorySearchViewModel>(); Coroutine.Completed += (s, e) => { if (e.Error == null) { return; } Debug.Write(e.Error.Message); }; ConventionManager.AddElementConvention <AutoSuggestBox>(AutoSuggestBox.TextProperty, "Text", "QuerySubmitted"); }
protected override void Configure() { container = new WinRTContainer(); container.RegisterWinRTServices(); //TODO: Register your view models at the container container.PerRequest<FaultedSensorsViewModel>(); }
protected override void Configure() { container = new WinRTContainer(); container.RegisterWinRTServices(); container.PerRequest <MainViewModel>(); container.PerRequest <DetailViewModel>(); if (Execute.InDesignMode) { container.PerRequest <IFeedService, FakeFeedService>(); } else { container.PerRequest <IFeedService, FeedService>(); } }
protected override void Configure() { _container = new WinRTContainer(); _container.RegisterWinRTServices(); // Make sure to register your containers here _container.PerRequest<ViewModels.IShellViewModel, ViewModels.ShellViewModel>(); }
protected override void Configure() { _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container.PerRequest <ShellViewModel>() .PerRequest <AccountTabViewModel>() .PerRequest <ValidateTabViewModel>(); _eventAggregator = _container.GetInstance <IEventAggregator>(); }
protected override void Configure() { ViewModelLocator.AddNamespaceMapping("Hello.Xamarin.Windows.Views", "Hello.Xamarin.Core.ViewModels"); container = new WinRTContainer(); container.RegisterWinRTServices(); container .PerRequest <LoginViewModel>(); }
protected override void Configure() { #if DEBUG LogManager.GetLog = type => new CaliburnDebugLogger(type); #endif _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container.Singleton <GattInformationProvider>().GetInstance <GattInformationProvider>().Initialize(); _container.Singleton <InfoManager>(); _container.Instance(new CommandRunner()); _container.Singleton <EventTracer>(); _container.Singleton <CharacteristicSubscriptionService>(); _container.Singleton <DeviceController>(); _container.Singleton <CommandPanelViewModel>(); _container.Singleton <Services.ApplicationSettings>(); _container.Singleton <ApplicationState>(); _container .PerRequest <MainViewModel>() .PerRequest <DeviceShellViewModel>() .PerRequest <SettingsViewModel>() .PerRequest <SelectDeviceViewModel>() .PerRequest <AboutViewModel>(); _container .PerRequest <ICommandFormatter, ReadFormatter>() .PerRequest <ICommandFormatter, WriteFormatter>() .PerRequest <ICommandFormatter, ReadClientConfigDescriptorFormatter>() .PerRequest <ICommandFormatter, WriteClientConfigDescriptorFormatter>() .PerRequest <ICommandFormatter, SubscribeFormatter>() .PerRequest <ICommandFormatter, UnsubscribeFormatter>() .PerRequest <ICommandFormatter, ConnectDeviceFormatter>() .PerRequest <ICommandFormatter, DisconnectDeviceFormatter>(); var tracer = _container.GetInstance <EventTracer>(); _eventAggregator = _container.GetInstance <IEventAggregator>(); }
protected override void Configure() { _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container .PerRequest <HomeViewModel>(); _eventAggregator = _container.GetInstance <IEventAggregator>(); }
protected override void Configure() { _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container .PerRequest<ShellViewModel>() .PerRequest<DeviceViewModel>(); _eventAggregator = _container.GetInstance<IEventAggregator>(); }
protected override void Configure() { MessageBinder.SpecialValues.Add("$clickeditem", c => ((ItemClickEventArgs)c.EventArgs).ClickedItem); ViewModelLocator.AddNamespaceMapping("Caliburn.Micro.HelloPortable.Views", "Caliburn.Micro.HelloPortable.Portable.ViewModels"); container = new WinRTContainer(); container.RegisterWinRTServices(); container.PerRequest<MainViewModel>(); PrepareViewFirst(); }
protected override void Configure() { MessageBinder.SpecialValues.Add("$clickeditem", c => ((ItemClickEventArgs)c.EventArgs).ClickedItem); var gitHubClient = new GitHubClient( new ProductHeaderValue("Caliburn.Micro.State", "1.0"), new InMemoryCredentialStore(Credentials.Anonymous)); _container = new WinRTContainer(); _container.RegisterWinRTServices(); _container.Instance<IGitHubClient>(gitHubClient); _container .PerRequest<RepositorySearchViewModel>() .PerRequest<RepositoryDetailsViewModel>(); }