Inheritance: IEditorTree
Beispiel #1
0
 public EditorDocumentMock(string content, string filePath = null) {
     var tb = new TextBufferMock(content, RContentTypeDefinition.ContentType);
     EditorTree = new EditorTreeMock(tb, RParser.Parse(content));
     ServiceManager.AddService<IREditorDocument>(this, tb, null);
     if (!string.IsNullOrEmpty(filePath)) {
         tb.Properties.AddProperty(typeof(ITextDocument), new TextDocumentMock(tb, filePath));
     }
 }
Beispiel #2
0
        public EditorDocumentMock(string content, string filePath = null)
        {
            var tb = new TextBufferMock(content, RContentTypeDefinition.ContentType);

            EditorTree = new EditorTreeMock(new EditorBuffer(tb), RParser.Parse(content));
            tb.AddService(this);
            if (!string.IsNullOrEmpty(filePath))
            {
                tb.Properties.AddProperty(typeof(ITextDocument), new TextDocumentMock(tb, filePath));
            }
        }