public ConsoleHighlightedLineViewProvider(
     IConsole console, IConsoleCursor consoleCursor,
     IColoredTextWriter coloredTextWriter,
     ITextHighlighter <TextStyle> textHighlighter)
 {
     _console           = console ?? throw new ArgumentNullException(nameof(console));
     _consoleCursor     = consoleCursor ?? throw new ArgumentNullException(nameof(consoleCursor));
     _coloredTextWriter = coloredTextWriter ?? throw new ArgumentNullException(nameof(coloredTextWriter));
     _textHighlighter   = textHighlighter ?? throw new ArgumentNullException(nameof(textHighlighter));
 }
 public DocumentStorage(
     IElasticClient elasticClient,
     IOptions <DocumentStorageOptions> options,
     IContentStorage contentStorage,
     ITextHighlighter textHighlighter)
 {
     this.elasticClient   = elasticClient ?? throw new ArgumentNullException(nameof(elasticClient));
     this.contentStorage  = contentStorage ?? throw new ArgumentNullException(nameof(contentStorage));
     this.textHighlighter = textHighlighter ?? throw new ArgumentNullException(nameof(textHighlighter));
     this.options         = options?.Value ?? throw new ArgumentNullException(nameof(options));
 }
 public ConsoleHighlightedLineView(
     IConsole console, IConsoleCursor consoleCursor,
     IColoredTextWriter coloredTextWriter,
     ITextHighlighter <TextStyle> textHighlighter)
 {
     _console           = console ?? throw new ArgumentNullException(nameof(console));
     _consoleCursor     = consoleCursor ?? throw new ArgumentNullException(nameof(consoleCursor));
     _coloredTextWriter = coloredTextWriter ?? throw new ArgumentNullException(nameof(coloredTextWriter));
     _textHighlighter   = textHighlighter ?? throw new ArgumentNullException(nameof(textHighlighter));
     _prevHighlights    = Array.Empty <StyledSpan <TextStyle> >();
     _line        = new InMemoryLineView();
     ViewType     = LineViewType.Normal;
     _hasChanges  = false;
     _prevLength  = 0;
     _maxPosition = 0;
 }