示例#1
0
 internal void Reset()
 {
     _firstES = null;
     _lastES = null;
     _startSourceIndex = 0;
     _endSourceIndex = 0;
 }
        private void PostponedOperation( DiffgramOperation op, int startSourceIndex, int endSourceIndex )
        {
            Debug.Assert( _bBuildingAddTree );
            Debug.Assert( op != null );

            EditScriptPostponed es = new EditScriptPostponed( op, startSourceIndex, endSourceIndex );

            if ( _postponedEditScript._firstES == null )
            {
            _postponedEditScript._firstES = es;
            _postponedEditScript._lastES = es;
            _postponedEditScript._startSourceIndex = startSourceIndex;
            _postponedEditScript._endSourceIndex = endSourceIndex;
            }
            else
            {
            Debug.Assert( _postponedEditScript._lastES != null );
            Debug.Assert( _postponedEditScript._lastES._startSourceIndex > endSourceIndex );

            _postponedEditScript._lastES._nextEditScript = es;
            _postponedEditScript._lastES = es;

            _postponedEditScript._startSourceIndex = startSourceIndex;
            }
        }