Esempio n. 1
0
 public virtual void Commit(ICommittedCallbackDispatcher dispatcher)
 {
     lock (Container().Lock())
     {
         CommitListeners();
         DispatchCommittingCallback();
         if (!DoCommittedCallbacks(dispatcher))
         {
             CommitImpl();
             CommitClearAll();
         }
         else
         {
             var deleted = CollectCommittedCallbackDeletedInfo();
             CommitImpl();
             var committedInfo = CollectCommittedCallbackInfo(deleted
                 );
             CommitClearAll();
             dispatcher.DispatchCommitted(CallbackObjectInfoCollections.Emtpy == committedInfo
                 ? committedInfo
                 : new CallbackObjectInfoCollections(committedInfo.added, committedInfo
                     .updated, new ObjectInfoCollectionImpl(deleted)));
         }
     }
 }
Esempio n. 2
0
 public virtual void Commit(ICommittedCallbackDispatcher dispatcher)
 {
     lock (Container().Lock())
     {
         DispatchCommittingCallback();
         if (!DoCommittedCallbacks(dispatcher))
         {
             CommitListeners();
             CommitImpl();
             CommitClearAll();
         }
         else
         {
             CommitListeners();
             Collection4 deleted = CollectCommittedCallbackDeletedInfo();
             CommitImpl();
             CallbackObjectInfoCollections committedInfo = CollectCommittedCallbackInfo(deleted
                                                                                        );
             CommitClearAll();
             dispatcher.DispatchCommitted(CallbackObjectInfoCollections.Emtpy == committedInfo
                                          ? committedInfo : new CallbackObjectInfoCollections(committedInfo.added, committedInfo
                                                                                              .updated, new ObjectInfoCollectionImpl(deleted)));
         }
     }
 }
Esempio n. 3
0
 public LocalTransaction(ObjectContainerBase container, Transaction parentTransaction
     , ITransactionalIdSystem idSystem, IReferenceSystem referenceSystem) : base(container
         , parentTransaction, referenceSystem)
 {
     _file = (LocalObjectContainer) container;
     _committedCallbackDispatcher = new _ICommittedCallbackDispatcher_39(this);
     _idSystem = idSystem;
 }
Esempio n. 4
0
 public LocalTransaction(ObjectContainerBase container, Transaction parentTransaction
                         , ITransactionalIdSystem idSystem, IReferenceSystem referenceSystem) : base(container
                                                                                                     , parentTransaction, referenceSystem)
 {
     _file = (LocalObjectContainer)container;
     _committedCallbackDispatcher = new _ICommittedCallbackDispatcher_39(this);
     _idSystem = idSystem;
 }
Esempio n. 5
0
 private bool DoCommittedCallbacks(ICommittedCallbackDispatcher dispatcher)
 {
     if (IsSystemTransaction())
     {
         return(false);
     }
     return(dispatcher.WillDispatchCommitted());
 }
Esempio n. 6
0
 private bool DoCommittedCallbacks(ICommittedCallbackDispatcher dispatcher)
 {
     if (IsSystemTransaction())
     {
         return false;
     }
     return dispatcher.WillDispatchCommitted();
 }