Пример #1
0
        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();
        }
Пример #2
0
        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);
        }
Пример #3
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);
        }
Пример #4
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container.Singleton <MainPageViewModel>();
            _container.Singleton <Screen1ViewModel>();
            _container.Singleton <Screen2ViewModel>();
            _container.Singleton <Screen3ViewModel>();
        }
Пример #5
0
        /// <summary>
        /// Override to configure the framework and setup your IoC container.
        /// </summary>
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container.Singleton <IDialogWindowManager, DialogWindowManager>();
            _container.Singleton <IUserNotificationService, UserNotificationService>();

            this.RegistInstances(this._container);

            _eventAggregator = _container.GetInstance <IEventAggregator>();
        }
Пример #6
0
        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>();
        }
Пример #7
0
        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);
        }
Пример #8
0
 protected override void Configure()
 {
     _container = new WinRTContainer();
     _container.RegisterWinRTServices();
     _container.Singleton <IE.Mobile.Forms.App>();
     _container.PerRequest <IPlayAudio, AudioService>();
 }
Пример #9
0
        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");
        }
Пример #10
0
        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));
        }
Пример #11
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container.Singleton <Guard.Bug.App>();
        }
Пример #12
0
        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();
        }
Пример #13
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>();
        }
        protected override void Configure()
        {
            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container.Singleton <IDicomFileReaderService, DicomFileReaderService>().PerRequest <ShellViewModel>();
        }
Пример #15
0
        protected override void Configure()
        {
            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container.Singleton <ShellViewModel>();
            AddWidgets();
        }
Пример #16
0
        protected override void Configure()
        {
            container = new WinRTContainer();
            container.RegisterWinRTServices();

            container
            .Singleton <ICredentialsService, SettingsCredentialsService>();
        }
Пример #17
0
        protected override void Configure()
        {
            base.Configure();

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

            _container.Singleton <Setup.Forms5.App>();
        }
Пример #18
0
        protected override void Configure()
        {
            _container = new WinRTContainer();
            _container.RegisterWinRTServices();

            _container.PerRequest<MainPageViewModel>();
            _container.PerRequest<CategoryDetailViewModel>();
            _container.Singleton<ICategoriesService, CategoriesService>();
        }
Пример #19
0
        protected override void Configure()
        {
            container = new WinRTContainer();

            container.RegisterWinRTServices();

            container.Singleton <ILayoutService, LayoutService>();
            container.Singleton <INavigationManager, NavigationManager>();
            container.Singleton <GenericFeedsViewModelFactory>();
            container.Singleton <IMessageRoot, TypeBasedMessageRoot>();

            container.PerRequest <FeedsViewModel>();
            container.PerRequest <ShellViewModel>();
            container.PerRequest <TitleCardViewModel>();
            container.PerRequest <MediaDetailsViewModel>();
            container.PerRequest <VideoDetailsViewModel>();
            container.PerRequest <ImageDetailsViewModel>();
        }
Пример #20
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
        }
Пример #21
0
        protected override void Configure()
        {
            Container = new WinRTContainer();
            Container.RegisterWinRTServices();

            Container.PerRequest <ShellViewModel>();
            Container.PerRequest <HomeViewModel>();
            Container.PerRequest <CashHomeViewModel>();
            Container.PerRequest <AccountsViewModel>();
            Container.PerRequest <CustomerViewModel>();
            Container.PerRequest <PinEntryViewModel>();
            Container.PerRequest <SaleViewModel>();
            Container.PerRequest <PayViewModel>();
            Container.PerRequest <LoanViewModel>();
            Container.PerRequest <ReceiptViewModel>();
            Container.PerRequest <AccountViewModel>();
            Container.PerRequest <AccountTransactionListViewModel>();
            Container.PerRequest <ProcessViewModel>();
            Container.PerRequest <MessageBoxViewModel>();
            Container.PerRequest <SettingsViewModel>();
            Container.PerRequest <InvoicePopupViewModel>();
            Container.PerRequest <PinPopupViewModel>();

            Container.Singleton <IServiceClientFactory, WindowsStoreServiceClientFactory>();

            Container.PerRequest <IApplicationService, ApplicationServiceProxy>();
            Container.PerRequest <ICustomerService, CustomerServiceProxy>();
            Container.PerRequest <IProductService, ProductServiceProxy>();
            Container.PerRequest <IInvoiceService, InvoiceServiceProxy>();
            Container.PerRequest <IDiscountService, DiscountServiceProxy>();

            Container.PerRequest <ICardHandler, CardReadHandler>();
            Container.PerRequest <ICardReadService, CardReadServiceProxy>();
            Container.PerRequest <ICardWriteService, CardWriteServiceProxy>();

            Container.Singleton <ScreenCoordinator>();
            Container.Singleton <CardService>();
            Container.PerRequest <ImageService>();

            var settings = Container.RegisterSettingsService();

            settings.RegisterCommand <SettingsViewModel>("Options");
        }
Пример #22
0
        private void RegisterServices()
        {
            _container            = new WinRTContainer();
            _container.Activated += TryRegister;
            _container.RegisterWinRTServices();

            _container
            .AssemblyContainingType <MainViewModel>()
            .RegisterViewModels();

            _container.Instance(AutoMaps.Initialize());
            _container.Singleton <ICacheService, CacheService>();
            _container.Singleton <IFilePickerService, FilePickerService>();
            _container.Singleton <IRegisteredDbsService, RegisteredDbsService>();

            _container.PerRequest <IEntrySubViewModel, EntryDetailsViewModel>();
            _container.PerRequest <IEntrySubViewModel, EntryNotesViewModel>();
            _container.PerRequest <IEntrySubViewModel, EntryAttachmentsViewModel>();
            _container.PerRequest <IEntrySubViewModel, EntryFieldsViewModel>();
        }
Пример #23
0
        protected override void Configure()
        {
            _container = new WinRTContainer();

            _container.RegisterWinRTServices();

            _container.Singleton <IStorageService, StorageService>()
            .Singleton <IApiService, ApiService>()
            .Singleton <IAdorableService, AdorableService>();

            // Make sure to register your containers here
            _container.PerRequest <AvatarViewModel>();
        }
Пример #24
0
        protected override void Configure()
        {
            ConfigureTitleBar();

            ViewModelLocator.AddNamespaceMapping("Demo.App.Views", "Demo.Core.ViewModels");
            ViewLocator.AddNamespaceMapping("Demo.Core.ViewModels", "Demo.App.Views");

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

            container.Singleton <ISettingsService, StorageSettingsService>();
            container.Singleton <IRepositoryService, RepositoryService>();
            container.Singleton <IIssuesService, IssuesService>();

            container.Instance(CreateClient());

            container
            .ViewModel <ShellViewModel>()
            .ViewModel <MenuViewModel>()
            .ViewModel <RepositoryDetailsViewModel>()
            .ViewModel <IssuesListViewModel>();
        }
Пример #25
0
        //Called after and when  DisplayRootView is called!!!
        protected override void Configure()
        {
            try
            {
                _container = new WinRTContainer();
                _container.RegisterWinRTServices();

                _container.Singleton <IRestClient, RestClient>();//RestClient   //FakeRestClient
                _container.Singleton <IMessageDialog, AdvancedMessageDialog>();
                _container.Singleton <ILocalSettings, LocalSettings.LocalSettings>();


                // Register your view models at the container.
                _container.PerRequest <MainViewModel>();
                _container.PerRequest <InformationViewModel>();
                _container.PerRequest <ITileManager, TileManager>();
            }
            catch (Exception exception)
            {
                _log.Error(exception);
                throw;
            }
        }
Пример #26
0
        protected override void Configure()
        {
            _container = new WinRTContainer();

            _container.RegisterWinRTServices();

            _container
            .Instance(_container);

            _container
            .Singleton <XMCM.App>();

            // TODO: Register any Platform Specific abstractions here
        }
Пример #27
0
        protected override void Configure()
        {
            _container = new WinRTContainer();

            _container.RegisterWinRTServices();

            _container
            .Singleton <ShellViewModel>()
            .Singleton <MainViewModel>()
            .Singleton <ICellSelectionManager, CellSelectionManager>()
            .Singleton <IImageManager, ImageManager>()
            .Singleton <ILevelSelectionManager, LevelSelectionManager>()
            .Singleton <ILevelManager, LevelManager>();
        }
Пример #28
0
        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>();
        }
Пример #29
0
        protected override void Configure()
        {
            container = new WinRTContainer();

            container.RegisterWinRTServices();

            container
            .Singleton <IRequestManager, RequestManager>()
            .Singleton <IImageManager, ImageManager>()
            .Singleton <IProductManager, ProductManager>()

            .PerRequest <MainViewModel>()
            .PerRequest <ProductDetailViewModel>();
        }
Пример #30
0
        protected override void Configure()
        {
            ApplicationLanguages.PrimaryLanguageOverride = GlobalizationPreferences.Languages[0];

            #region Migrations

            using (var db = new AppDbContext())
            {
                db.Database.Migrate();
            }

            #endregion

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

            _container
            .Singleton <ShellPageViewModel>()
            .Singleton <LibraryPageViewModel>()
            .PerRequest <BookPageViewModel>()
            .PerRequest <BookImportPageViewModel>()
            .Singleton <AppDbContext>()
            .Singleton <IMenuProvider, ShellMenuProvider>()
            .Singleton <IDbBookProvider, AppDbBookProvider>()
            .Singleton <IStorageBookProvider, LocalStorageBookProvider>()
            .Singleton <IBookLinesProvider, BookLinesProvider>()
            .Singleton <IFictionBookFormatter, FictionBookFormatter>()
            .Singleton <IBookManager, BookManager>();
//#if DEBUG
//                .Singleton<IInAppPurchase, SimulatorInAppPurchase>();
//#else
//                .Singleton<IInAppPurchase, MarketInAppPurchase>();
//#endif

            _eventAggregator = _container.GetInstance <IEventAggregator>();

            var navigation = SystemNavigationManager.GetForCurrentView();
            navigation.AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
            navigation.BackRequested += (o, e) =>
            {
                e.Handled = true;

                var n = IoC.Get <INavigationService>();
                if (n.CanGoBack)
                {
                    n.GoBack();
                }
            };
        }