internal void HandleComponentCreated(Object sender, ComponentEventArgs e) { AddEntityToPersisted((Entity)sender); }
/// <summary> /// When a Component was upgraded to a new version, the entity that is informing about the upgrade is entirely (cascaded) persisted to the database /// </summary> /// <param name="sender">Sender of the event (the Entity)</param> /// <param name="e">Event arguments</param> internal void OnComponentUpgraded(Object sender, ComponentEventArgs e) { // TODO: change cascading persistence of entity, but only persist component and take care to persist mapping to entity as well //AddEntityToPersisted (e.Component.Parent); }
void HandleCreatedComponent(object sender, ComponentEventArgs e) { if (e.Component.Name == "avatar") e.Component.ChangedAttribute += HandleChangedAvatarComponent; }