private static UITouchBlockPresenter CreateTouchBlockPresenter(ICanvas canvas, string touchBlockWindowPrefabPath) { var touchBlockPrefabParams = PrefabGenParamsFactory.Create(canvas, touchBlockWindowPrefabPath); var touchBlockPresenter = PresenterFactory <UITouchBlockPresenter, UITouchBlockWindow> .Create(touchBlockPrefabParams); return(touchBlockPresenter); }
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); }
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); }