public void Store(UncommittedChangeSet changeSet)
 {
     changeSets.Add(new ChangeSet(changeSet.Id, changeSet.ParentId, changeSet.Comment, changeSet.Commands));
     if (OnStored != null)
     {
         OnStored(this, new EventArgs());
     }
 }
 public void Store(UncommittedChangeSet changeSet)
 {
     changeSets.Add(new ChangeSet(changeSet.Id, changeSet.ParentId, changeSet.Comment, changeSet.Commands));
     if (OnStored != null)
     {
         OnStored(this, new EventArgs());
     }
 }
 public ISnapshot Create(UncommittedChangeSet pendingChanges)
 {
     lock (synchRoot)
     {
         EnsureLoaded();
         return(CreateSnapshot(pendingChanges));
     }
 }
 public ISnapshot Create(UncommittedChangeSet pendingChanges)
 {
     lock (synchRoot)
     {
         EnsureLoaded();
         return CreateSnapshot(pendingChanges);
     }
 }
 public void Commit(UncommittedChangeSet pendingChanges)
 {
     var snapshot = snapshots.Create(pendingChanges);
     try
     {
         dataStore.Store(pendingChanges);
         snapshots.Add(pendingChanges.Id, snapshot);
     }
     catch (Exception)
     {
         snapshots.Invalidate(snapshot);
         throw;
     }
 }
Esempio n. 6
0
        public void Commit(UncommittedChangeSet pendingChanges)
        {
            var snapshot = snapshots.Create(pendingChanges);

            try
            {
                dataStore.Store(pendingChanges);
                snapshots.Add(pendingChanges.Id, snapshot);
            }
            catch (Exception)
            {
                snapshots.Invalidate(snapshot);
                throw;
            }
        }
 public IUpdatableObjectSpaceSnapshot GetSnapshot(UncommittedChangeSet pendingChanges)
 {
     return new UpdatableObjectSpaceSnapshot(objectTypeDescriptorRepository, new PendingChangesDataRetrievalStrategy(dataFacade, pendingChanges), commandExecutor);
 }
 public void Commit(UncommittedChangeSet newChangeSet)
 {
     dataFacade.Commit(newChangeSet);
 }
Esempio n. 9
0
        public ObjectState GetById(ObjectId objectId, UncommittedChangeSet pendingChanges)
        {
            var snapshot = snapshots.Create(pendingChanges);

            return(snapshot.GetById(objectId));
        }
Esempio n. 10
0
        public IEnumerable <ObjectState> Enumerate(UncommittedChangeSet pendingChanges)
        {
            var snapshot = snapshots.Create(pendingChanges);

            return(snapshot.Enumerate());
        }
Esempio n. 11
0
 public PendingChangesDataRetrievalStrategy(IDataFacade dataFacade, UncommittedChangeSet pendingChanges)
 {
     this.dataFacade     = dataFacade;
     this.pendingChanges = pendingChanges;
 }
 public ObjectState GetById(ObjectId objectId, UncommittedChangeSet pendingChanges)
 {
     var snapshot = snapshots.Create(pendingChanges);
     return snapshot.GetById(objectId);
 }
 public IEnumerable<ObjectState> Enumerate(UncommittedChangeSet pendingChanges)
 {
     var snapshot = snapshots.Create(pendingChanges);
     return snapshot.Enumerate();
 }
 public void Commit(UncommittedChangeSet newChangeSet)
 {
     dataFacade.Commit(newChangeSet);
 }
 public IUpdatableObjectSpaceSnapshot GetSnapshot(UncommittedChangeSet pendingChanges)
 {
     return(new UpdatableObjectSpaceSnapshot(objectTypeDescriptorRepository, new PendingChangesDataRetrievalStrategy(dataFacade, pendingChanges), commandExecutor));
 }
 public PendingChangesDataRetrievalStrategy(IDataFacade dataFacade, UncommittedChangeSet pendingChanges)
 {
     this.dataFacade = dataFacade;
     this.pendingChanges = pendingChanges;
 }