public virtual void OnCreating(IAPIModel model)
        {
            var entity = (T_Entity)model;

            if (this.Owner == null)
            {
                this.Owner = entity;
            }

            //this is intentional that model can be something different than the owner, it helps to use singleton pattern with a share alike relation
            this.OnEntityCreated(entity);
        }
 public void OnControllerReady(IAPIModel model)
 {
     this.OnControllerFinished((T_Entity)model);
 }
        public async Task OnDestroy(IAPIModel model)
        {
            await this.OnEntityDestroy((T_Entity)model);

            this.Owner = default(T_Entity);
        }
예제 #4
0
 public void OnDestroy(IAPIModel model)
 {
     this.OnEntityDestroy((T_Entity)model);
     this.Owner = default(T_Entity);
 }