protected override void Configure()
        {
            container = new PhoneContainer();

            container.RegisterSingleton(typeof(MainPageViewModel), "MainPageViewModel", typeof(MainPageViewModel));
            container.RegisterSingleton(typeof(ItemViewModel), "ItemViewModel", typeof(ItemViewModel));

            container.RegisterInstance(typeof(INavigationService), null, new FrameAdapter(RootFrame));
            container.RegisterInstance(typeof(IPhoneService), null, new PhoneApplicationServiceAdapter(PhoneService));

            container.Activator.InstallChooser<PhoneNumberChooserTask, PhoneNumberResult>();
            container.Activator.InstallLauncher<EmailComposeTask>();
        }
Exemple #2
0
        /// <summary>
        /// Override to configure the framework and setup your IoC container.
        /// </summary>
        protected override void Configure()
        {
            m_container = new PhoneContainer();

            m_container.RegisterSingleton(
                typeof(MainPageViewModel),
                "MainPageViewModel",
                typeof(MainPageViewModel));

            m_container.RegisterSingleton(
                typeof(ThreadingPageViewModel),
                "ThreadingPageViewModel",
                typeof(ThreadingPageViewModel));

            m_container.RegisterSingleton(
                typeof(SterlingPageViewModel),
                "SterlingPageViewModel",
                typeof(SterlingPageViewModel));

            m_container.RegisterSingleton(
                typeof(SterlingExtensionsPageViewModel),
                "SterlingExtensionsPageViewModel",
                typeof(SterlingExtensionsPageViewModel));

            m_container.RegisterSingleton(
                typeof(CodeOnlyPageViewModel),
                "CodeOnlyPageViewModel",
                typeof(CodeOnlyPageViewModel));

            m_container.RegisterInstance(
                typeof(ICargoRepository),
                null,
                new CargoRepository());

            m_container.RegisterInstance(
                typeof(INavigationService),
                null,
                new FrameAdapter(RootFrame));

            m_container.RegisterInstance(
                typeof(IPhoneService),
                null,
                new PhoneApplicationServiceAdapter(PhoneService));

            m_container.Activator.InstallChooser <PhoneNumberChooserTask, PhoneNumberResult>();
            m_container.Activator.InstallLauncher <EmailComposeTask>();
        }
Exemple #3
0
        protected override void Configure()
        {
            container = new PhoneContainer(RootFrame);

            container.RegisterPhoneServices();
            container.RegisterAllViewModelsForPages();
            //container.PerRequest<TabViewModel, TabViewModel>();


            container.RegisterSingleton <IAccountRepository, AccountRepository>();
            container.RegisterSingleton <IPhotoService <PicasaAlbum, PicasaMediaGroup>, GooglePicasaService>();

            container.RegisterSingleton <IStorage <PicasaAccount>, AccountStorage>();


            container.RegisterSingleton <IPhoneService <PhoneAlbum>, Phone.Api.PhoneService>();

            AddCustomConventions();
        }
        protected override void Configure()
        {
            container = new PhoneContainer();

            container.RegisterSingleton(typeof(MainPageViewModel), "MainPageViewModel", typeof(MainPageViewModel));

            container.RegisterInstance(typeof(INavigationService), null, new FrameAdapter(RootFrame));
            container.RegisterInstance(typeof(IPhoneService), null, new PhoneApplicationServiceAdapter(PhoneService));

            //container.Activator.InstallChooser<PhoneNumberChooserTask, PhoneNumberResult>();
            //container.Activator.InstallLauncher<EmailComposeTask>();

            AddCustomConventions();
        }
Exemple #5
0
        protected override void Configure()
        {
            container = new PhoneContainer(RootFrame);

            container.RegisterPhoneServices();

            // services
            container.RegisterSingleton(typeof(IAppSettings), "AppSettings", typeof(AppSettings));
            container.RegisterSingleton(typeof(INavigationManager), "NavigationManager", typeof(NavigationManager));
            container.RegisterSingleton(typeof(IMessageService), "MessageService", typeof(MessageService));

            container.Instance <IProgressService>(new ProgressService(RootFrame));
            container.PerRequest <IFlowdockContext, LoggedInFlowdockContext>();
            container.PerRequest <IFlowStreamingConnection, FlowStreamingConnection>();


            // viewmodels
            container.PerRequest <LoginViewModel>();
            container.PerRequest <LobbyViewModel>();
            container.PerRequest <FlowViewModel>();
            container.PerRequest <UsersViewModel>();
            container.PerRequest <MessageThreadViewModel>();
        }
Exemple #6
0
        protected override void Configure()
        {
            _container = new PhoneContainer(this);
            _container.RegisterPerRequest(typeof(MainPageViewModel), "MainPageViewModel", typeof(MainPageViewModel));
            _container.RegisterPerRequest(typeof(PageTwoViewModel), "PageTwoViewModel", typeof(PageTwoViewModel));
            _container.RegisterSingleton(typeof(TabViewModel), null, typeof(TabViewModel));

            _container.RegisterInstance(typeof(INavigationService), null, new FrameAdapter(RootFrame));
            _container.RegisterInstance(typeof(IPhoneService), null, new PhoneApplicationServiceAdapter(PhoneService));

            _container.Activator.InstallChooser<PhoneNumberChooserTask, PhoneNumberResult>();
            _container.Activator.InstallLauncher<EmailComposeTask>();

            AddCustomConventions();
        }
        protected override void Configure()
        {
            container = new PhoneContainer(RootFrame);

            container.RegisterPhoneServices();
            container.PerRequest <MainViewModel>();
            container.PerRequest <DetailsViewModel>();
            container.PerRequest <PhotoShareViewModel>();
            container.PerRequest <ITalao, Talao>();
            container.RegisterSingleton(typeof(IMultasRealizadas), null, typeof(MultasRealizadas));
            container.Instance <IObjectStorageHelper <ListaDeMultasRealizadas> >(new ObjectStorageHelper <ListaDeMultasRealizadas>());
            AddCustomConventions();
#if DEBUG
            //LogManager.GetLog = type => new DebugLogger(type);
#endif
            MapeiaRootFrame();
        }
		public Bootstrapper()
		{
			container = new PhoneContainer(this);
			container.RegisterSingleton(typeof(MainPageViewModel), "MainPageViewModel", typeof(MainPageViewModel));
			container.RegisterSingleton(typeof(FavoritesViewModel), null, typeof(FavoritesViewModel));
			container.RegisterSingleton(typeof(MostViewedViewModel), null, typeof(MostViewedViewModel));
			container.RegisterSingleton(typeof(AboutViewModel), null, typeof(AboutViewModel));
			container.RegisterSingleton(typeof(UserPivotViewModel), "UserPivotViewModel", typeof(UserPivotViewModel));
			container.RegisterSingleton(typeof(UserDetailsViewModel), null, typeof(UserDetailsViewModel));
			container.RegisterSingleton(typeof(UserRepositoriesViewModel), null, typeof(UserRepositoriesViewModel));
			container.RegisterSingleton(typeof(UserWatchingViewModel), null, typeof(UserWatchingViewModel));
			container.RegisterSingleton(typeof(RepositoryPivotViewModel), "RepositoryPivotViewModel", typeof(RepositoryPivotViewModel));
			container.RegisterSingleton(typeof(RepositoryDetailsViewModel), null, typeof(RepositoryDetailsViewModel));
			container.RegisterSingleton(typeof(RepositoryLinksViewModel), null, typeof(RepositoryLinksViewModel));
			container.RegisterSingleton(typeof(RepositoryContributorsViewModel), null, typeof(RepositoryContributorsViewModel));
			container.RegisterSingleton(typeof(IProgressService), null, typeof(ProgressService));
			container.RegisterSingleton(typeof(ISimpleCache), null, typeof(SimpleCache));
			container.RegisterSingleton(typeof(IRequestProcessor), null, typeof(CachingRequestProcessor));

			container.RegisterPerRequest(typeof(IGitHubHost), null, typeof(GitHubHost));

			container.RegisterInstance(typeof(INavigationService), null, new FrameAdapter(RootFrame));
			container.RegisterInstance(typeof(IPhoneService), null, new PhoneApplicationServiceAdapter(PhoneService));

			container.Activator.InstallLauncher<WebBrowserTask>();
			container.Activator.InstallLauncher<EmailComposeTask>();
		}