示例#1
0
 /// <summary>Initializes an <see cref="TextDocument"/> with the given initial text and storage objects.</summary>
 public TextDocument(TextReader initialText, EditableTextBuffer textBuffer, LineStorage lineStorage)
 {
   this.textBuffer  = textBuffer == null ? new GapTextBuffer() : textBuffer;
   this.lineStorage = lineStorage == null ? new TreeLineStorage() : lineStorage;
   if(initialText != null) Insert(Length, initialText);
 }
示例#2
0
 /// <summary>Initializes an empty <see cref="TextDocument"/> with the given storage objects.</summary>
 public TextDocument(EditableTextBuffer textBuffer, LineStorage lineStorage) : this(null, textBuffer, lineStorage) { }