Ejemplo n.º 1
0
        protected override void Configure()
        {
            _container = new PhoneContainer();
            _container.RegisterPhoneServices(RootFrame);

            _container.Instance(RootFrame);

            _container.Singleton<ICache, FileSystemCache>();
            
            // View Models
            _container.Singleton<SplashViewModel>();
            _container.Singleton<AboutViewModel>();
            _container.Singleton<ShellViewModel>();
            _container.Singleton<MyBoardsViewModel>();
            _container.Singleton<MyCardsViewModel>();
            _container.Singleton<MyNotificationsViewModel>();
            _container.Singleton<ProfileViewModel>();

            _container.PerRequest<BoardViewModel>();
            _container.PerRequest<BoardListViewModel>();
            _container.PerRequest<CardViewModel>();
            _container.PerRequest<CardDetailPivotViewModel>();
            _container.PerRequest<CardDetailOverviewViewModel>();
            _container.PerRequest<CardDetailChecklistViewModel>();
            _container.PerRequest<CardDetailAttachmentsViewModel>();
            _container.PerRequest<CardDetailMembersViewModel>();
            _container.PerRequest<ChecklistViewModel>();
            _container.PerRequest<ChecklistItemViewModel>();
            _container.PerRequest<AttachmentViewModel>();
            _container.AllTransientTypesOf<NotificationViewModel>();

            // Event handlers
            _container.AllSingletonTypesOf<AbstractHandler>();

            // Services
            _container.PerRequest<Services.IApplicationBar, DefaultApplicationBar>();
            _container.Singleton<INetworkService, NetworkService>();
            _container.Singleton<IProgressService, ProgressService>();
            _container.Singleton<ITrelloApiSettings, TrelloSettings>();
            
#if DISCONNECTED
            _container.Singleton<IRequestClient, JsonFileRestClient>();
#else
            _container.Singleton<IRequestClient, TrelloRestClient>();
#endif
            var network = _container.Get<INetworkService>();
            var client = AugmentClient(_container);
            var trello = new Trello(network, client);
            _container.Instance<ITrello>(trello);

            PhoneToolkitConventions.Install();
            TelerikConventions.Install();

            // Force creation
            _container.InstantiateInstancesOf<AbstractHandler>();
        }
Ejemplo n.º 2
0
        protected override void Configure()
        {
            container = new PhoneContainer(RootFrame);

            container.RegisterPhoneServices();
            container.PerRequest<MainPageViewModel>();
            container.Instance<IProgressService>(new ProgressService(RootFrame));

            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();
        }
Ejemplo n.º 4
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>();
		}