Esempio n. 1
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterInstance(typeof(WinRTContainer), null, _container);
            _container.RegisterInstance(typeof(SimpleContainer), null, _container);

            _container.Singleton <Shared.App>();

            // TODO: Register Platform-specific dependencies here
        }
Esempio n. 2
0
        private UIElement CreateShell()
        {
            var shellPage = new Views.ShellPage();

            _container.RegisterInstance(typeof(IConnectedAnimationService), nameof(IConnectedAnimationService), new ConnectedAnimationService(shellPage.GetFrame()));
            return(shellPage);
        }
Esempio n. 3
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterInstance(typeof(WinRTContainer), null, _container);
            _container.RegisterInstance(typeof(SimpleContainer), null, _container);

            _container.Singleton <InfusionGames.CityScramble.App>();

            _container.Singleton <IMessageDialogService, UwpDialogService>();
            _container.Singleton <IPlatformAuthenticator, UwpPlatformAuthenticator>();
            _container.Instance <AccountStore>(new UwpAccountStore());
            _container.Singleton <IImageService, UwpImageService>();
            //_container.Singleton<IApplicationService, LocationService>();
            //_container.Singleton<IApplicationService, TouchPushNotificationService>();
            //_container.Singleton<INetworkService, UwpNetworkService>();
        }
Esempio n. 4
0
        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>();
        }
Esempio n. 5
0
        protected override void Configure()
        {
            LogManager.GetLog = t => new DebugLog(t);

            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container.RegisterInstance(typeof(IFavoritesRepository), null, new DefaultFavoritesRepository());

            container.RegisterPerRequest(typeof(IMessageService), null, typeof(DefaultMessageService));
            container.RegisterPerRequest(typeof(ILocationService), null, typeof(DefaultLocationService));

            container
            .PerRequest <MainViewModel>()
            .PerRequest <CurrentGasPricesViewModel>();
        }