Exemplo 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)));
         }
     }
 }
Exemplo 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)));
         }
     }
 }
Exemplo 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;
 }
Exemplo 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;
 }
Exemplo n.º 5
0
 private bool DoCommittedCallbacks(ICommittedCallbackDispatcher dispatcher)
 {
     if (IsSystemTransaction())
     {
         return(false);
     }
     return(dispatcher.WillDispatchCommitted());
 }
Exemplo n.º 6
0
 private bool DoCommittedCallbacks(ICommittedCallbackDispatcher dispatcher)
 {
     if (IsSystemTransaction())
     {
         return false;
     }
     return dispatcher.WillDispatchCommitted();
 }