예제 #1
0
파일: SourceReader.cs 프로젝트: zgf/VBF
        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
파일: SourceReader.cs 프로젝트: zgf/VBF
        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);
        }
예제 #4
0
파일: SourceReader.cs 프로젝트: zgf/VBF
 public void RemoveRevertPoint(RevertPoint revertPoint)
 {
     m_revertPoints.Remove(revertPoint.Key);
 }
예제 #5
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;
        }
예제 #6
0
 public void RemoveRevertPoint(RevertPoint revertPoint)
 {
     m_revertPoints.Remove(revertPoint.Key);
 }