Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }