TransactedPropertyTChanged Event |
Namespace: AGI.Foundation.Infrastructure.Threading
This event is raised in the thread that committed the transaction and is raised inside the commit lock. This means that it is only raised by one thread at a time and it is raised once per transaction in the order in which the transactions are committed.
When this event is raised, all values modified by the transaction have already been committed and will be visible to a transaction started within an event handler. Attempting to commit another transaction within a handler hooked up to this event will result in an InvalidOperationException, however. If additional changes are necessary, use the ChainedTransaction and do not manually commit it. It will be automatically committed after all handlers for this event have finished executing. It is guaranteed that the chained transaction will commit immediately after all event handlers return, before any other transaction can commit, and that it will not raise a TransactionConflictException.
It is very important that subscribers to this event execute very quickly in order to avoid blocking the entire transaction system.