Inheritance: IVsTextBuffer, IVsTextLines, IVsTextStream, IVsExpansion
 public IVsTextBuffer CreateVsTextBufferAdapterForSecondaryBuffer(OLE.Interop.IServiceProvider serviceProvider, ITextBuffer secondaryBuffer)
 {
     VsTextBufferMock tb = new VsTextBufferMock(secondaryBuffer);
     _textBufferAdapters[tb.TextBuffer] = tb;
     _vsTextBufferAdapters[tb] = tb.TextBuffer;
     return tb;
 }
        public void SetDataBuffer(IVsTextBuffer bufferAdapter, ITextBuffer dataBuffer)
        {
            IVsTextBuffer vsBuffer;

            if (_textBufferAdapters.TryGetValue(dataBuffer, out vsBuffer))
            {
                _vsTextBufferAdapters.Remove(vsBuffer);
                _textBufferAdapters.Remove(dataBuffer);
            }

            ITextBuffer tb;

            if (_vsTextBufferAdapters.TryGetValue(bufferAdapter, out tb))
            {
                _vsTextBufferAdapters.Remove(bufferAdapter);
                _textBufferAdapters.Remove(tb);
            }

            VsTextBufferMock mock = bufferAdapter as VsTextBufferMock;

            mock.TextBuffer = dataBuffer;

            _vsTextBufferAdapters[bufferAdapter] = dataBuffer;
            _textBufferAdapters[dataBuffer]      = bufferAdapter;
        }
 public IVsTextBuffer CreateVsTextBufferAdapter(OLE.Interop.IServiceProvider serviceProvider, IContentType contentType)
 {
     VsTextBufferMock tb = new VsTextBufferMock(contentType);
     _textBufferAdapters[tb.TextBuffer] = tb;
     _vsTextBufferAdapters[tb] = tb.TextBuffer;
     return tb;
 }
        public IVsTextBuffer CreateVsTextBufferAdapterForSecondaryBuffer(OLE.Interop.IServiceProvider serviceProvider, ITextBuffer secondaryBuffer)
        {
            VsTextBufferMock tb = new VsTextBufferMock(secondaryBuffer);

            _textBufferAdapters[tb.TextBuffer] = tb;
            _vsTextBufferAdapters[tb]          = tb.TextBuffer;
            return(tb);
        }
        public IVsTextBuffer CreateVsTextBufferAdapter(OLE.Interop.IServiceProvider serviceProvider, IContentType contentType)
        {
            VsTextBufferMock tb = new VsTextBufferMock(contentType);

            _textBufferAdapters[tb.TextBuffer] = tb;
            _vsTextBufferAdapters[tb]          = tb.TextBuffer;
            return(tb);
        }