Пример #1
0
        public void Install()
        {
            dataStore.Initialize();
            useCaseConductor.Initialize();

            var eventSender    = new UnityAnalyticEventSender();
            var mainRepository = new MainRepository(dataStore);

            mainRepository.SetEventSender(eventSender);

            var preparationUs = new PreparationUseCase();

            preparationUs.SetRepository(mainRepository);
            var preparationPresenter = new PrepatationPresenter(preparationUs, preparationView);

            useCaseConductor.AddUseCase <UseCaseNames>(UseCaseNames.Preparation, preparationUs);

            var titleUS = new ShowTitleUseCase();

            titleUS.SetRepository(mainRepository);
            var titlePresenter = new TitlePresenter(titleUS, titleView);

            useCaseConductor.AddUseCase <UseCaseNames>(UseCaseNames.ShowTitle, titleUS);

            var playUS = new PlayUseCase();

            playUS.SetRepository(mainRepository);
            var playPresenter = new PlayPresenter(playUS, playView);

            useCaseConductor.AddUseCase <UseCaseNames>(UseCaseNames.Play, playUS);

            var resultUS = new ShowResultUseCase();

            resultUS.SetRepository(mainRepository);
            var resultPresenter = new ResultPresenter(resultUS, resultView);

            useCaseConductor.AddUseCase <UseCaseNames>(UseCaseNames.ShowResult, resultUS);
        }
 public TitlePresenter(ShowTitleUseCase useCase, ITitleView view)
 {
     this.useCase = useCase;
     this.view    = view;
     Bind();
 }