示例#1
0
        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);
        }
示例#2
0
 public void OnTextBufferCreated(ITextBuffer textBuffer)
 {
     TextBufferCreated?.Invoke(this, new TextBufferListenerEventArgs(textBuffer));
 }