SadConsole.Consoles.Cursor.ResetAppearanceToConsole C# (CSharp) Method

ResetAppearanceToConsole() public method

Resets the cursor appearance to the console's default foreground and background.
Thrown when the backing console's CellData is null.
public ResetAppearanceToConsole ( ) : Cursor
return Cursor
        public Cursor ResetAppearanceToConsole()
        {
            var console = ((SurfaceEditor)_console.Target);

            if (console.TextSurface != null)
                PrintAppearance = new CellAppearance(console.TextSurface.DefaultForeground, console.TextSurface.DefaultBackground);
            else
                throw new Exception("CellData of the attached console is null. Cannot reset appearance.");

            return this;
        }