Пример #1
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>();
        }