Esempio n. 1
0
        /// <summary>
        /// Creates the new structure from call snapshot.
        /// </summary>
        /// <param name="callSnapshot">The call snapshot.</param>
        private void createNewStructureFromCallSnapshot(Snapshot callSnapshot)
        {
            Structure = Factories.SnapshotStructureFactory.CopyInstance(callSnapshot.Structure);

            writeableTargetStructure = Structure.Writeable;
            targetStructure          = writeableTargetStructure;

            writeableTargetStructure.ReinitializeTracker(callSnapshot.Structure.Readonly);

            // Initializes merge workers with newly created structure
            arrayWorker  = new MergeArrayStructureWorker(writeableTargetStructure, this);
            aliasWorker  = new MergeAliasStructureWorker(writeableTargetStructure, this);
            objectWorker = new MergeObjectsStructureWorker(writeableTargetStructure, this);
        }
Esempio n. 2
0
        /// <summary>
        /// Creates the new structure from common ancestor.
        /// </summary>
        /// <param name="commonAncestor">The common ancestor.</param>
        private void createNewStructureFromCommonAncestor(IReadonlyChangeTracker <IReadOnlySnapshotStructure> commonAncestor)
        {
            Structure = Factories.SnapshotStructureFactory.CreateNewInstanceWithData(commonAncestor.Container);

            writeableTargetStructure = Structure.Writeable;
            targetStructure          = writeableTargetStructure;

            writeableTargetStructure.ReinitializeTracker(commonAncestor.Container);

            // Initializes merge workers with newly created structure
            arrayWorker  = new MergeArrayStructureWorker(writeableTargetStructure, this);
            aliasWorker  = new MergeAliasStructureWorker(writeableTargetStructure, this);
            objectWorker = new MergeObjectsStructureWorker(writeableTargetStructure, this);
        }