상속: IBufferGraph
예제 #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);
        }
예제 #4
0
 public TextViewMock(IEnumerable <ITextBuffer> textBuffers, int caretPosition) :
     this(textBuffers.First(), caretPosition)
 {
     BufferGraph = new BufferGraphMock(textBuffers);
 }