• Tutorials
  • Api Documentation
  • Download
  • Credits
Show / Hide Table of Contents
  • AutoCheck.Core
    • Output
    • Output.Log
    • Output.Style
    • Output.Type
    • Script
    • Script.ExecutionMode
    • Utils
    • Utils.OS
  • AutoCheck.Core.Connectors
    • Atom
    • Base
    • Compressed
    • Css
    • Csv
    • CsvDocument
    • Dmoj
    • GDrive
    • Html
    • Math
    • Odoo
    • Operator
    • PlainText
    • PlainText.PlainTextDocument
    • Postgres
    • Rss
    • Shell
    • TextStream
    • Xml
    • Xml.XmlNodeType
  • AutoCheck.Core.CopyDetectors
    • Base
    • Base.Mode
    • Css
    • Html
    • PlainText
    • PlainText.File
    • SourceCode
    • SqlLog
    • Xml
  • AutoCheck.Core.Events
    • LogUpdateEventArgs
    • StatusUpdateEventArgs
    • StatusUpdateEventArgs.ExecutionEvent
  • AutoCheck.Core.Exceptions
    • ArgumentInvalidException
    • ArgumentNotFoundException
    • ConfigFileMissingException
    • ConnectionInvalidException
    • ConnectorInvalidException
    • ConnectorNotFoundException
    • DocumentInvalidException
    • DownloadFailedException
    • ItemNotFoundException
    • PorpertyNotFoundException
    • QueryInvalidException
    • RegexInvalidException
    • ResultMismatchException
    • ScriptInvalidException
    • ScriptNotFoundException
    • StyleInvalidException
    • StyleNotAppliedException
    • StyleNotFoundException
    • TableInconsistencyException
    • VariableInvalidException
    • VariableNotFoundException
  • Google.DiffMatchPatch
    • Diff
    • DiffMatchPatch
    • Operation
    • Patch

Class Output

This class is in charge of writing the output into the terminal.

Inheritance
System.Object
Output
Namespace: AutoCheck.Core
Assembly: AutoCheck.Core.dll
Syntax
public class Output : object
Remarks

Should be a singletone but cannot be due testing...

Constructors

| Improve this Doc View Source

Output()

Creates the new Output instance

Declaration
public Output()
| Improve this Doc View Source

Output(Boolean)

Creates the new Output instance

Declaration
public Output(bool redirectToTerminal = false)
Parameters
Type Name Description
System.Boolean redirectToTerminal

When enabled, every log entry will be send to the terminal

Fields

| Improve this Doc View Source

SingleIndent

Declaration
public const string SingleIndent = null
Field Value
Type Description
System.String

Properties

| Improve this Doc View Source

CurrentIndent

Declaration
public string CurrentIndent { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

BreakLine(Int32)

Writes a set of breakline into the output.

Declaration
public void BreakLine(int lines = 1)
Parameters
Type Name Description
System.Int32 lines

The amount of breaklines.

| Improve this Doc View Source

CloseLog()

The current log will be closed, so a new empty one will be ready to start logging again.

Declaration
public Output.Log CloseLog()
Returns
Type Description
Output.Log

The closed log

| Improve this Doc View Source

GetLog()

Returns the complete log files for each batch (or single) execution (header + setup + script + teardown).

Declaration
public Output.Log[] GetLog()
Returns
Type Description
Output.Log[]
| Improve this Doc View Source

Indent()

Adds an indentation (3 whitespaces) to the output.

Declaration
public void Indent()
| Improve this Doc View Source

ResetIndent()

Resets the output indentation.

Declaration
public void ResetIndent()
| Improve this Doc View Source

SendToTerminal(Output.Log)

Sends the given log to the terminal.

Declaration
public void SendToTerminal(Output.Log log)
Parameters
Type Name Description
Output.Log log

The log to print.

| Improve this Doc View Source

ToJson()

Returns the Output history as an string, using \r\n as breaklines.

Declaration
public string ToJson()
Returns
Type Description
System.String
| Improve this Doc View Source

ToString()

Returns the Output history as an string, using \r\n as breaklines.

Declaration
public string ToString()
Returns
Type Description
System.String
| Improve this Doc View Source

UnIndent()

Removes an indentation (3 whitespaces) from the output.

Declaration
public void UnIndent()
| Improve this Doc View Source

Write(String, Output.Style)

Send new text to the output, no breakline will be added to the end. The text will be printed in gray, and everything between '~' symbols will be printed using a secondary color (or till the last ':' or '...' symbols).

Declaration
public void Write(string text, Output.Style style = Output.Style.DEFAULT)
Parameters
Type Name Description
System.String text

The text to display

Output.Style style

Which stuyle will be applied in order to print using colors.

| Improve this Doc View Source

WriteLine(String, Output.Style)

Send new text to the output, a breakline will be added to the end. The text will be printed in gray, and everything between '~' symbols will be printed using a secondary color (or till the last ':' or '...' symbols).

Declaration
public void WriteLine(string text, Output.Style style = Output.Style.DEFAULT)
Parameters
Type Name Description
System.String text

The text to display

Output.Style style

Which stuyle will be applied in order to print using colors.

| Improve this Doc View Source

WriteResponse(List<String>, String, String)

Given a list of strings containing the errors found during a script execution (usually the return of a checker's method), the output will be as follows: 'OK' in green if the errors list is empty; 'ERROR' in red, followed by all the errors descriptions (as a list), otherwise.

Declaration
public void WriteResponse(List<string> errors = null, string captionOk = "OK", string captionError = "ERROR")
Parameters
Type Name Description
List<System.String> errors

A list of errors, usually the return of a checker's method.

System.String captionOk
System.String captionError
| Improve this Doc View Source

WriteResponse(String, String, String)

Given a string containing an error description, the output will be as follows: 'ERROR' in red, followed by the errors description if the error is not empty; just 'ERROR' in red otherwise.

Declaration
public void WriteResponse(string error, string captionOk = "OK", string captionError = "ERROR")
Parameters
Type Name Description
System.String error
System.String captionOk
System.String captionError

Events

| Improve this Doc View Source

OnLogUpdate

Declaration
public event EventHandler<LogUpdateEventArgs> OnLogUpdate
Event Type
Type Description
EventHandler<LogUpdateEventArgs>

Extension Methods

ObjectExtensions.DeepClone<T>(T)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX