protected virtual object AllocateView(IEntity entity, ViewComponent viewComponent) { var viewToAllocate = ViewPool.AllocateInstance(); viewComponent.View = viewToAllocate; OnViewAllocated(viewToAllocate, entity); return(viewToAllocate); }
protected virtual void RecycleView(IEntity entity, ViewComponent viewComponent) { var view = viewComponent.View; ViewPool.ReleaseInstance(view); viewComponent.View = null; OnViewRecycled(view, entity); }
protected virtual void OnViewRemoved(IEntity entity, ViewComponent viewComponent) => ViewHandler.DestroyView(viewComponent.View);
protected abstract void OnViewCreated(IEntity entity, ViewComponent viewComponent);