public ITextBuffer CreateTextBuffer(string text, IContentType contentType) { if (text == null) throw new ArgumentNullException(nameof(text)); if (contentType == null) throw new ArgumentNullException(nameof(contentType)); var textBuffer = new TextBuffer(contentType, text); TextBufferCreated?.Invoke(this, new TextBufferCreatedEventArgs(textBuffer)); return textBuffer; }
public TextEdit(TextBuffer textBuffer, EditOptions options, int? reiteratedVersionNumber, object editTag) { if (textBuffer == null) throw new ArgumentNullException(nameof(textBuffer)); this.textBuffer = textBuffer; TextSnapshot = textBuffer.CurrentSnapshot; changes = new List<ITextChange>(); this.options = options; this.reiteratedVersionNumber = reiteratedVersionNumber; this.editTag = editTag; }
public TextSnapshot(ITextSource textSource, IContentType contentType, TextBuffer textBuffer, ITextVersion textVersion) { if (textSource == null) throw new ArgumentNullException(nameof(textSource)); if (contentType == null) throw new ArgumentNullException(nameof(contentType)); if (textBuffer == null) throw new ArgumentNullException(nameof(textBuffer)); if (textVersion == null) throw new ArgumentNullException(nameof(textVersion)); this.textSource = textSource; ContentType = contentType; TextBuffer = textBuffer; Version = textVersion; }
public TextImage(TextBuffer textBuffer, ITextSource textSource, ITextImageVersion version) { TextBuffer = textBuffer ?? throw new ArgumentNullException(nameof(textBuffer)); this.textSource = textSource ?? throw new ArgumentNullException(nameof(textSource)); Version = version ?? throw new ArgumentNullException(nameof(version)); }