Ejemplo n.º 1
0
        private static UITouchBlockPresenter CreateTouchBlockPresenter(ICanvas canvas,
                                                                       string touchBlockWindowPrefabPath)
        {
            var touchBlockPrefabParams = PrefabGenParamsFactory.Create(canvas, touchBlockWindowPrefabPath);
            var touchBlockPresenter    =
                PresenterFactory <UITouchBlockPresenter, UITouchBlockWindow> .Create(touchBlockPrefabParams);

            return(touchBlockPresenter);
        }
Ejemplo n.º 2
0
        public void TestPresenterFactory()
        {
            ITestPresenter presenter = PresenterFactory.Create().GetPresenter <ITestPresenter>(new TestView());

            Assert.IsNotNull(presenter);

            ITestGenericPresentor <Entities.Address> presenter2 = PresenterFactory.Create().GetPresenter <ITestGenericPresentor <Entities.Address> >(new TestView());

            Assert.IsNotNull(presenter2);
        }
Ejemplo n.º 3
0
        protected TPresenter CreatePresenter <TPresenter, TView>(ICanvas canvas, string prefabPath)
            where TPresenter : PresenterBase <TView>
            where TView : ViewBase
        {
            var prefabGenParams = PrefabGenParamsFactory.Create(canvas, prefabPath);
            var presenter       = PresenterFactory <TPresenter, TView> .Create(prefabGenParams);

            _presenters.Add(presenter);

            return(presenter);
        }