Changeset 5055 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/TransactionManager.cs
- Timestamp:
- 12/07/10 11:19:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/TransactionManager.cs
r4796 r5055 6 6 using System.Transactions; 7 7 using HeuristicLab.Common; 8 using HeuristicLab.Clients.Common; 8 9 9 10 namespace HeuristicLab.Services.Hive.DataAccess { … … 12 13 TransactionScope transaction = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = ApplicationConstants.IsolationLevelScope }); 13 14 var disposable = new Disposable<TransactionScope>(transaction); 14 disposable. Disposing += disposable_Disposing;15 disposable.OnDisposing += new EventHandler<EventArgs<object>>(disposable_OnDisposing); 15 16 return disposable; 16 17 } 17 18 18 void disposable_Disposing(object sender, EventArgs<TransactionScope> scope) { 19 scope.Value.Complete(); 20 scope.Value.Dispose(); 19 void disposable_OnDisposing(object sender, EventArgs<object> e) { 20 TransactionScope scope = (TransactionScope)e.Value; 21 scope.Complete(); 22 scope.Dispose(); 21 23 } 22 24 }
Note: See TracChangeset
for help on using the changeset viewer.