Following is the code for a base class that adds a new parameter to the Item Updating and Item Updated methods that specifies whether the event was called as a result of a check-in operation.These methods are just like the Item Updating and Item Updated methods in the SPItem Event Receiver class, but they have an additional Boolean parameter named is Check In that indicates whether or not the event is being raised as result of a check-in operation.Damon gives just one example of a poisoned dagger in the game of Sharepoint Development: The Item Event Receiver.I’m usually disappointed when writers employ oft-overused metaphors to describe a situation.Sometimes that is the most exciting way to learn, but for those less adventurous I will briefly cover the topic here.
Later on, when you checked the document in, you would see those events fire again.
Next, let’s look at what happens when the user adds a document when the Require Check Out option is enabled.
The first time the Item Updating and Item Updated events fire it is in response to the document properties changing.
Simply put, the Item Updating and Item Updated fire twice when adding a document to a library that has the Require Check Out option enabled.
To understand why this is happening, let’s first look at what happens when the user adds a document to the library when the Require Check Out option is disabled: So the net result of this is that the document is uploaded and the Item Adding and Item Added events have fired, which is pretty much what you would expect.