Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
This is largely related to my previous question regarding obtaining the before and after values of a property when a document is saved. The only way I can see to do this is to hook into the Document.BeforeSave event, retrieving the sender object's requried property value representing the 'before state' and persisting it somewhere. Then during the Document.AfterSave/AfterPublish event retrieving this stored value and comparing it to the sender's property value in the current method representing the 'after state'.
My question is where is the best place to store the 'before value'? I am currently persisting it in HttpContext.Current.Session. I was wondering if I could persist as a private field of my custom ApplicationBase class that contains the two methods for the BeforeSave and AfterSave event handlers? Would this be thread/context safe in the face of multiple concurrent saves i.e. will each user have there own unique instance of this class or could it potentially be shared? Other than not using Session are there any other pros or cons?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted