There is a little puzzlement among Asynchronousand Synchronous events, however I believe after reading this article, there will be no place for confusion in your brain, the reason for that I go behind a childlike practice to memorize what is Asynchronous ? and what is Synchronous ?
The same babyish method, I want to share with you.
A for Apple, A for Asynchronous and A for After events, so all Asynchronous events occur after the event, which does not stop the code to execute. All Asynchronous events end with ‘ed’ letters like SiteDeleted, FieldAdded, ItemAdded etc.
Now, let’s talk on the subject of Synchronous events, all Synchronous events occur before the event, which stop the code to execute. All Synchronous events end with ‘ing’ letters like SiteDeleting, FieldAdding, ItemAdding etc.
SPWebEventReceiver Asynchronous Events
SiteDeleted | Occurs after an existing site collection deleted. |
WebDeleted | Occurs after an existing web site is completely deleted. |
WebMoved | Occurs after an existing web site has been moved. |
SPWebEventReceiver Synchronous Events
SiteDeleting | Occurs before an existing site collection is being deleted. |
WebDeleting | Occurs before an existing web site is deleted. |
WebMoving | Occurs before an existing web site has been renamed or moved |
SPListEventReceiver Asynchronous Methods
FieldAdded | Occurs after a field link is added. |
FieldDeleted | Occurs after a field has been removed from the list. |
FieldUpdated | Occurs after a field link has been updated |
SPListEventReceiver Synchronous Methods
FieldAdding | Occurs before a field link is added to a content type. |
FieldDeleting | Occurs before a field is removed from the list. |
FieldUpdating | Occurs before a field link is updated |
SPItemEventReceiver Asynchronous Methods
ItemAdded | Occurs after a new item has been added |
ItemAttachmentAdded | Occurs after an attachment added to an item. |
ItemAttachmentDeleted | Occurs after an attachment removed from an item. |
ItemCheckedOut | Occurs after an item is checked out. |
ItemDeleted | Occurs after an item is completely deleted. |
ItemFileMoved | Occurs after a file is moved. |
ItemUpdated | Occurs after an item is modified/edited. |
SPListItemEventReceiver Synchronous Methods
ItemAdding | Occurs before a new item is added. |
ItemAttachmentAdding | Occurs before an attachment is added to an item. |
ItemAttachmentDeleting | Occurs before an attachment when a user removed from an item. |
ItemCheckingIn | Occurs before a file is checking-in. |
ItemCheckingOut | Occurs before an item is checking-out. |
ItemDeleting | Occurs before an item is completely deleted. |
ItemFileMoving | Occurs before a file is moved. |
ItemUncheckedOut | Occurs before an item is unchecked out. |
ItemUncheckingOut | Before event that occurs when an item is being unchecked out. |
ItemUpdating | Occurs before an existing item is modified/edited. |
SharePoint Foundation 2010 New Events
Microsoft added several new events to SharePoint Foundation 2010 on Site, List and Item level. These fresh events are intended to meet up the requirements and for better elasticity.
SPWebEventReceiver
WebAdding | Occurs before a new web site is created. |
WebProvisioned | Occurs after the web is provisioned. |
WebAdding: event arises prior to a fresh web site is created, we can control the website to create or not to create by WebAdding event, then no SharePoint site is created and the provisioning process is not started.
WebProvisioned: event arise after the web is totally provisioned and process has stopped up. WebProvisioned can be configured to control in any synchronous or asynchronous methods.
If user wants to add few webparts to the newly provisioned web we can use this event to meet up the necessity
SPListEventReceiver
ListAdding | Occurs before a list is created. |
ListAdded | Occurs after a list is created. |
ListDeleting | Occurs before a list is deleted. |
ListDeleted | Occurs after a list is deleted. |
No comments:
Post a Comment