示例#1
0
        public TextViewMock(ITextBuffer textBuffer, int caretPosition) {
            TextBuffer = textBuffer;

            TextDataModel = new TextDataModelMock(TextBuffer);
            TextViewModel = new TextViewModelMock(textBuffer);

            Caret = new TextCaretMock(this, caretPosition);
            Selection = new TextSelectionMock(this, new TextRange(caretPosition, 0));

            TextViewLines = new TextViewLineCollectionMock(TextBuffer);
            BufferGraph = new BufferGraphMock(TextBuffer);
        }
示例#2
0
        public TextViewMock(ITextBuffer textBuffer, int caretPosition)
        {
            TextBuffer = textBuffer;

            TextDataModel = new TextDataModelMock(TextBuffer);
            TextViewModel = new TextViewModelMock(textBuffer);

            Caret     = new TextCaretMock(this, caretPosition);
            Selection = new TextSelectionMock(this, new TextRange(caretPosition, 0));

            TextViewLines = new TextViewLineCollectionMock(TextBuffer);
            BufferGraph   = new BufferGraphMock(TextBuffer);
        }
示例#3
0
        public TextViewMock(ITextBuffer textBuffer, int caretPosition)
        {
            TextBuffer = textBuffer;

            TextDataModel = new TextDataModelMock(TextBuffer);
            TextViewModel = new TextViewModelMock(textBuffer);

            Caret     = new TextCaretMock(this, caretPosition);
            Selection = new TextSelectionMock(this, new TextRange(caretPosition, 0));

            TextViewLines = new TextViewLineCollectionMock(TextBuffer);
            BufferGraph   = new BufferGraphMock(TextBuffer);

            var view = new EditorView(this);

            Properties.AddProperty(typeof(IEditorView), view);
        }