Class Output
Class to provide output capabilities. Output can be filtered by errors, warnings, and general info.
Inheritance
Inherited Members
Namespace: TuringTrader.SimulatorV2
Assembly: TuringTrader.Simulator.dll
Syntax
public static class Output
Properties
| Improve this Doc View SourceDisplayMode
Current output mode.
Declaration
public static Output.DisplayModeType DisplayMode { get; }
Property Value
Type | Description |
---|---|
Output.DisplayModeType |
WriteEvent
Debug output event. The application should attach an event handler here to redirect the messages to a console.
Declaration
public static Action<string> WriteEvent { get; set; }
Property Value
Type | Description |
---|---|
System.Action<T><string> |
Methods
| Improve this Doc View SourceThrowError(string, params object[])
Display error message. Note that this method will also throw an exception.
Declaration
public static void ThrowError(string format, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
string | format | |
object[] | args |
Exceptions
Type | Condition |
---|---|
System.Exception |
Write(string, params object[])
Display output message. This is a legacy method, and will be removed from the API soon. Use Info, Warning, or Error instead.
Declaration
public static void Write(string format, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
string | format | |
object[] | args |
WriteInfo(string, params object[])
Display informational message. These messages will only be shown if DisplayMode is set to errorsWarningsAndInfo.
Declaration
public static void WriteInfo(string format, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
string | format | |
object[] | args |
WriteLine(string, params object[])
Display output message on a new line. This is a legacy method, and will be removed from the API soon. Use Info, Warning, or Error instead.
Declaration
public static void WriteLine(string format, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
string | format | |
object[] | args |
WriteWarning(string, params object[])
Display warning message. These messages will only be shown if DisplayMode is set to errorsWarningsAndInfo, errorsAndWarnings, or errorsAndWarningsOnce. For errorsAndWarningsOnce, the message will only be shown the first time, repeated warnings with the same text will be suppressed.
Declaration
public static void WriteWarning(string format, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
string | format | |
object[] | args |