Event Support

Many of the operations performed in NCommet.Core raise events. These events are available to your application though the singleton class EventSink. This design is very flexible because you only subscribe to EventSink: you don't have to subscribe to every item to listen to events. A sequence diagram clearly illustrates that aspect.

The supported events are the following:
  • ItemCreated: Occurs when a new transient item is created.
  • ItemAdded: Occurs when an item is added as a child of another item.
  • ItemSaving: Occurs before an item is saved.
  • ItemSaved: Occurs after an item is saved.
  • ItemChangedParent: Occurs after an item has changed parent.
  • ItemDeleting: Occurs before an item is deleted.
  • ItemDeleted: Occurs after an item is deleted.
  • ChildrenCleared: Occurs when the children collection of an item is cleared.
  • ChildrenReordered: Occurs when the sort order of a child item changes inside its parent's children collection.
  • ItemChangingParent: Occurs when an item will change parent.
  • ItemShallowCloned: Occurs when an item is shallow cloned.
  • ItemDeepCloned: Occurs when an item is deep cloned.

Last edited Apr 11, 2008 at 11:13 AM by NikolaosGeorgiou, version 3

Comments

No comments yet.