Пример #1
0
 /// <summary>
 ///     Pops the top most stack frame from the scope calling stack and drops
 ///     its content because it's no longer needed.
 /// </summary>
 /// <remarks>
 ///     This won't necessarily exchange the <c>LightweightedTransactionScope.Current</c>.
 /// </remarks>
 private void PopAndDropScope()
 {
     s_currentScope = m_savedScope;
 }
Пример #2
0
 /// <summary>
 ///     Add <c>scope</c> on top of the scope calling stack. Will be removed during
 ///     <c>Dispose()</c>.
 /// </summary>
 /// <param name="scope">
 ///     Scope to be pushed on the calling stack.
 /// </param>
 /// <remarks>
 ///     Stack structure may contain redundant frames, but this keeps a consistent
 ///     stack access in the code.
 ///     Call  stack: | scopeA | scopeB | scopeB1 | scopeC  | scodeD | scopeE
 ///     Saved value: | null   | scopeA | scopeB  | scopeB  | null   | scopeD
 ///     Current val: | scopeA | scopeB | scopeB  | null    | scopeD | scopeE
 /// </remarks>
 private void PushScope(NhTransactionScope scope)
 {
     m_savedScope = s_currentScope;
     s_currentScope = scope;
 }