public TerminalController( ITerminalView view, SizeD charSize, int charsPerLine, Span prompt, Span promptWrap, Span promptOutput, Span promptOutputWrap, Colour defaultForegroundColour, Colour defaultBackgroundColour ) { m_view = view; #region param checks if( view == null ) { throw new ArgumentNullException( "view" ); } if( charSize == null ) { throw new ArgumentNullException( "charSize" ); } if( prompt == null ) { throw new ArgumentNullException( "prompt" ); } if( promptWrap == null ) { throw new ArgumentNullException( "promptWrap" ); } if( promptOutput == null ) { throw new ArgumentNullException( "promptOutput" ); } if( defaultBackgroundColour == null ) { throw new ArgumentNullException( "defaultBackgroundColour" ); } if( defaultForegroundColour == null ) { throw new ArgumentNullException( "defaultForegroundColour" ); } #endregion Prompt = prompt; CharSize = charSize; CharsPerLine = charsPerLine; PromptWrap = promptWrap; PromptOutput = promptOutput; PromptOutputWrap = promptOutputWrap; DefaultBackgroundColour = defaultBackgroundColour; DefaultForegroundColour = defaultForegroundColour; Prompt.IsPrompt = true; promptWrap.IsPrompt = true; promptOutput.IsPrompt = true; promptOutputWrap.IsPrompt = true; ClearCurrentLine(); }
public TerminalController( ITerminalView view, SizeD charSize, int charsPerLine, Span prompt, Span promptWrap, Span promptOutput, Span promptOutputWrap ) : this( view, charSize, charsPerLine, prompt, promptWrap, promptOutput, promptOutputWrap, Colours.White, Colours.Black ) { }