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

            return(touchBlockPresenter);
        }
示例#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);
        }
示例#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);
        }