IConsole Interface

Summary

Provides console I/O operations used by GitVersion's logging infrastructure.
Namespace
GitVersion.Logging
graph BT Type["IConsole"] class Type type-node

Syntax

public interface IConsole

Methods

Name Value Summary
ReadLine() string
Reads a line of text from the console.
UseColor(ConsoleColor) IDisposable
Returns a disposable that sets the console foreground colour to consoleColor and restores the previous colour when disposed.
Write(string) void
Writes msg to the console without a trailing newline.
WriteLine(string) void
Writes msg followed by a newline to the console.

Extension Methods

Name Value Summary
NotNull<IConsole>(string) T
Throws ArgumentNullException when value is null; otherwise returns the value.
GitHub