コード例 #1
0
        public void Revert(RevertPoint revertPoint)
        {
            CodeContract.Requires(m_revertPoints.Contains(revertPoint.Key), "revertPoint",
                                  "The revert point is invalid");
            Debug.Assert(revertPoint.Offset >= 0 && revertPoint.Offset < m_backupStreamBuilder.Length);

            //seek backup stream reader
            m_backupReader.Position = revertPoint.Offset;

            //restore location state
            m_lastLocation = revertPoint.LastLocation;
            m_location     = revertPoint.Location;
        }
コード例 #2
0
        public RevertPoint CreateRevertPoint()
        {
            if (m_backupStreamBuilder == null)
            {
                CreateBackupStream();
            }

            int revertPointKey = GetRevertPointKey();

            RevertPoint revertPoint = new RevertPoint(revertPointKey, m_backupReader.Position, m_lastLocation, m_location);

            m_revertPoints.Add(revertPoint);

            return(revertPoint);
        }
コード例 #3
0
 public void RemoveRevertPoint(RevertPoint revertPoint)
 {
     m_revertPoints.Remove(revertPoint.Key);
 }