Exemplo n.º 1
0
        protected virtual object AllocateView(IEntity entity, ViewComponent viewComponent)
        {
            var viewToAllocate = ViewPool.AllocateInstance();

            viewComponent.View = viewToAllocate;
            OnViewAllocated(viewToAllocate, entity);

            return(viewToAllocate);
        }
Exemplo n.º 2
0
        protected virtual void RecycleView(IEntity entity, ViewComponent viewComponent)
        {
            var view = viewComponent.View;

            ViewPool.ReleaseInstance(view);
            viewComponent.View = null;

            OnViewRecycled(view, entity);
        }
Exemplo n.º 3
0
 protected virtual void OnViewRemoved(IEntity entity, ViewComponent viewComponent) =>
 ViewHandler.DestroyView(viewComponent.View);
Exemplo n.º 4
0
 protected abstract void OnViewCreated(IEntity entity, ViewComponent viewComponent);