public OperationAccessor(MergeOperation operation, Snapshot targetSnapshot, IWriteableSnapshotData writeableTargetData, IReadOnlySnapshotStructure targetStructure) { this.operation = operation; this.targetSnapshot = targetSnapshot; this.writeableTargetData = writeableTargetData; this.targetStructure = targetStructure; }
/// <summary> /// Creates the new data from common ancestor. /// </summary> /// <param name="commonAncestor">The common ancestor.</param> private void createNewDataFromCommonAncestor(IReadonlyChangeTracker <IReadOnlySnapshotData> commonAncestor) { Data = Factories.SnapshotDataFactory.CreateNewInstanceWithData(commonAncestor.Container); writeableTargetData = Data.Writeable; writeableTargetData.ReinitializeTracker(commonAncestor.Container); }
/// <summary> /// Creates the new data from call snapshot. /// </summary> /// <param name="callSnapshot">The call snapshot.</param> private void createNewDataFromCallSnapshot(Snapshot callSnapshot) { Data = Factories.SnapshotDataFactory.CopyInstance(callSnapshot.CurrentData); writeableTargetData = Data.Writeable; writeableTargetData.ReinitializeTracker(callSnapshot.CurrentData.Readonly); }
/// <summary> /// Initializes a new instance of the <see cref="AbstractAssignWorker"/> class. /// </summary> /// <param name="factories">The factories.</param> /// <param name="snapshot">The snapshot.</param> /// <param name="treeCollector">The tree collector.</param> /// <param name="pathModifications">The path modifications.</param> public AbstractAssignWorker(ModularMemoryModelFactories factories, Snapshot snapshot, TreeIndexCollector treeCollector, MemoryIndexModificationList pathModifications) { Factories = factories; this.Snapshot = snapshot; this.treeCollector = treeCollector; this.PathModifications = pathModifications; this.Structure = snapshot.Structure.Writeable; this.Data = snapshot.CurrentData.Writeable; }
/// <summary> /// Creates the new data. /// </summary> private void createNewData() { Data = Factories.SnapshotDataFactory.CopyInstance(callSnapshot.Data); writeableTargetData = Data.Writeable; }