IConsole Interface

Summary

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

Syntax

public interface IConsole

Attributes

Type Description
NullableContextAttribute

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 System.ArgumentNullException when value is null; otherwise returns the value.