protected virtual void OnEntityMessage(EntityMessage <TEntity, TPrimaryKey> message) { if (Entity == null) { return; } if (message.MessageType == EntityMessageType.Deleted && object.Equals(message.PrimaryKey, PrimaryKey)) { Close(); } }
void OnMessage(EntityMessage <TEntity, TPrimaryKey> message) { if (!owner.IsLoaded) { return; } switch (message.MessageType) { case EntityMessageType.Added: OnEntityAdded(message.PrimaryKey); break; case EntityMessageType.Changed: OnEntityChanged(message.PrimaryKey); break; case EntityMessageType.Deleted: OnEntityDeleted(message.PrimaryKey); break; } }
void OnMessage(EntityMessage <TEntity, TPrimaryKey> message) { Refresh(); }