상속: IEditorTree
예제 #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));
     }
 }
예제 #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));
            }
        }