Author Topic: How to doublecheck transactions  (Read 1681 times)

0 Members and 1 Guest are viewing this topic.

internet explorer

  • Guest
How to doublecheck transactions
« on: May 14, 2016, 03:59:45 PM »
Is there way to double check all transactions in a plugin are committed or cleared at the end?

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Re: How to doublecheck transactions
« Reply #1 on: May 15, 2016, 01:22:56 AM »
This is interesting...going to look into it myself.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2149
  • class keyThumper<T>:ILazy<T>
Re: How to doublecheck transactions
« Reply #2 on: May 15, 2016, 08:43:42 AM »

https://msdn.microsoft.com/en-AU/library/yh598w02.aspx
Quote
As a rule, when you use an IDisposable object, you should declare and instantiate it in a using statement. The using statement calls the Dispose method on the object in the correct way, and (when you use it as shown earlier) it also causes the object itself to go out of scope as soon as Dispose is called. Within the using block, the object is read-only and cannot be modified or reassigned.
The using statement ensures that Dispose is called even if an exception occurs while you are calling methods on the object. You can achieve the same result by putting the object inside a try block and then calling Dispose in a finally block; in fact, this is how the using statement is translated by the compiler. The code example earlier expands to the following code at compile time (note the extra curly braces to create the limited scope for the object):

Is there a particular reason you believe the transactions are not committed ??

Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

internet explorer

  • Guest
Re: How to doublecheck transactions
« Reply #3 on: May 15, 2016, 04:43:32 PM »
Think some transactions aren't being properly handled because sometimes crash occurs, or graphics act funny.  Things duplicate on the screen when panning around but they can't be selected.