Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Current

? Transaction System.Transactions.Transaction.Current
staticgetsetinherited

Definition at line 22 of file Transaction.cs.

23 {
24 get
25 {
26 TransactionsEtwProvider log = TransactionsEtwProvider.Log;
27 if (log.IsEnabled())
28 {
29 log.MethodEnter(TraceSourceType.TraceSourceBase, "Transaction.get_Current");
30 }
32 if (currentScope != null && currentScope.ScopeComplete)
33 {
35 }
36 if (log.IsEnabled())
37 {
38 log.MethodExit(TraceSourceType.TraceSourceBase, "Transaction.get_Current");
39 }
40 return current;
41 }
42 set
43 {
44 TransactionsEtwProvider log = TransactionsEtwProvider.Log;
45 if (log.IsEnabled())
46 {
47 log.MethodEnter(TraceSourceType.TraceSourceBase, "Transaction.set_Current");
48 }
49 if (InteropMode(ContextData.TLSCurrentData.CurrentScope) != 0)
50 {
51 if (log.IsEnabled())
52 {
53 log.InvalidOperation("Transaction", "Transaction.set_Current");
54 }
56 }
58 CallContextCurrentData.ClearCurrentData(null, removeContextData: false);
59 if (log.IsEnabled())
60 {
61 log.MethodExit(TraceSourceType.TraceSourceBase, "Transaction.set_Current");
62 }
63 }
64 }
static string TransactionScopeComplete
Definition SR.cs:60
static string CannotSetCurrent
Definition SR.cs:22
Definition SR.cs:7
static void GetCurrentTransactionAndScope(TxLookup defaultLookup, out Transaction current, out TransactionScope currentScope, out Transaction contextTransaction)
static EnterpriseServicesInteropOption InteropMode(TransactionScope currentScope)