public bool Remove(string key) { var c = Get(key); if (c != null) { var e = new EventToManageComponent <TComponent>(); e.SetUpAsRemoveEvent(this, key); Engine.ChangesToBeCommited.Enqueue(e); return(true); } return(false); }
public void Add(TComponent component, string key) { if (component == null) { Particular.Helper.ThrowException("ArgumentNullException(Component)"); } else { var e = new EventToManageComponent <TComponent>(); e.SetUpAsAddEvent(this, component, key); Engine.ChangesToBeCommited.Enqueue(e); owner.__Register(component); } }