示例#1
0
        public void DisconnectSubjectBuffer(ITextBuffer subjectBuffer)
        {
            // only disconnect if we own the buffer parser
            Debug.Assert(_bufferParser != null, "SetBufferParser has not been called");
            BufferParser existingParser;

            if (subjectBuffer.Properties.TryGetProperty <BufferParser>(typeof(BufferParser), out existingParser) &&
                --existingParser.AttachedViews == 0)
            {
                _bufferParser.RemoveBuffer(subjectBuffer);
            }
        }
示例#2
0
 public void DisconnectSubjectBuffer(ITextBuffer subjectBuffer)
 {
     _bufferParser.RemoveBuffer(subjectBuffer);
     _subjectBuffers.Remove(subjectBuffer);
 }