public ITextImage CreateTextImage(TextReader reader, long length) { bool hasConsistentLineEndings; int longestLineLength; return(CachingTextImage.Create(TextImageLoader.Load(reader, length, string.Empty, out hasConsistentLineEndings, out longestLineLength), null)); }
protected BaseSnapshot(ITextVersion2 version, StringRebuilder content) { this.version = version; this.Content = content; this.cachingContent = CachingTextImage.Create(this.Content, version.ImageVersion); // we must extract the content type here, because the content type of the text buffer may change later. this.contentType = version.TextBuffer.ContentType; }
public ITextImage CreateTextImage(string text) { return(CachingTextImage.Create(StringRebuilder.Create(text), null)); }
public ITextImage GetSubText(Span span) { return(CachingTextImage.Create(this.Builder.GetSubText(span), version: null)); }