Ejemplo n.º 1
0
 public ChangeSet(ChangeSetId id, ChangeSetId?parentId, string comment, IEnumerable <AbstractCommand> commands)
 {
     this.id       = id;
     this.parentId = parentId;
     this.comment  = comment;
     this.commands = commands.ToList();
 }
 public ISnapshot GetById(ChangeSetId changeSetId)
 {
     lock (synchRoot)
     {
         EnsureLoaded();
         return(GetSnapshot(changeSetId));
     }
 }
        private ISnapshot GetSnapshot(ChangeSetId changeSetId)
        {
            ISnapshot snapshot;

            if (!snapshots.TryGetValue(changeSetId, out snapshot))
            {
                throw new InvalidOperationException(string.Format("Requested change set {0} has not been loaded.", changeSetId));
            }
            return(snapshot);
        }
 public void Add(ChangeSetId changeSetId, ISnapshot snapshot)
 {
     lock (synchRoot)
     {
         if (snapshots.ContainsKey(changeSetId))
         {
             throw new InvalidOperationException(
                       string.Format("Another change set with the id {0} has already been loaded.", changeSetId));
         }
         snapshots[changeSetId] = snapshot;
     }
 }
Ejemplo n.º 5
0
        public ObjectState GetById(ObjectId objectId, ChangeSetId changeSetId)
        {
            var snapshot = snapshots.GetById(changeSetId);

            return(snapshot.GetById(objectId));
        }
Ejemplo n.º 6
0
        public IEnumerable <ObjectState> Enumerate(ChangeSetId changeSetId)
        {
            var snapshot = snapshots.GetById(changeSetId);

            return(snapshot.Enumerate());
        }
Ejemplo n.º 7
0
 public Point(ChangeSetId changeSetId, IComparable referenceValue)
 {
     this.changeSetId    = changeSetId;
     this.referenceValue = referenceValue;
 }
Ejemplo n.º 8
0
 public void RemovePointFor(ChangeSetId changeSetId)
 {
     points.RemoveAll(x => x.ChangeSetId == changeSetId);
 }
 public IObjectSpaceSnapshot GetSnapshot(ChangeSetId changeSetId)
 {
     return(new ObjectSpaceSnapshot(objectTypeDescriptorRepository, new PersistentDataRetrievalStrategy(dataFacade, changeSetId)));
 }
 public PersistentDataRetrievalStrategy(IDataFacade dataFacade, ChangeSetId lastedChangeSetId)
 {
     this.dataFacade        = dataFacade;
     this.lastedChangeSetId = lastedChangeSetId;
 }