/// <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); }
/// <summary>Initializes an empty <see cref="TextDocument"/> with the given storage objects.</summary> public TextDocument(EditableTextBuffer textBuffer, LineStorage lineStorage) : this(null, textBuffer, lineStorage) { }