Show / Hide Table of Contents

Class print

Writes text to the output window, console, log file or custom writer.

public static class print

Namespace: Au
Assembly: Au.dll
Inheritance
object
print

Properties

Name Description
ignoreConsole

If true, in console process will not use the console window. Then everything is like in non-console process.

isConsoleProcess

Returns true if this process is attached to a console.

isWritingToConsole

Returns true if is writing to console, false if to the output window etc.

logFile

Sets log file path. When set (not null), text passed to print.it will be written to the file. If value is null - restores default behavior.

logFileTimestamp

If true, will add current local time when using log file (see print.logFile).

noHex

Write unsigned numeric types in decimal format, not hexadecimal.

redirectConsoleOutput

Let Console.WriteX methods in non-console process write to the same destination as print.it.

redirectDebugOutput

Let Debug.Write, Trace.Write and similar methods also write to the same destination as print.it.

writer

Gets or sets object that actually writes text when is called print.it.

Methods

Name Description
clear()

Clears the output window or console text (if print.isWritingToConsole) or log file (if print.logFile not null).

directly(string)

Same as print.it, but does not pass the string to print.writer.

it(InterpolatedString)

Writes interpolated string to the output.

it(object)

Writes value of any type to the output.

it(object, object, params object[])

Writes multiple arguments of any type to the output, using separator ", ".

it(ReadOnlySpan<byte>, int)

Writes binary data to the output, formatted like in a hex editor.

it(string)

Writes string to the output.

it<T>(IEnumerable<T>)

Writes an array or generic collection to the output.

list(string, object, object, params object[])

Writes multiple arguments of any type to the output, using separator.

list<T>(string, IEnumerable<T>)

Writes an array or generic collection to the output, as a list of items separated by separator.

scrollToTop()

Scrolls the output window or console to the top.

warning(Exception, string)

Writes an exception warning to the output.

warning(string, int, string)

Writes a warning text to the output. By default appends the stack trace.