Class SimpleConsoleCommandTracer
Implementation of the ICommandTracer interface that will simply echo the commands and responses to the console. Useful when debugging a command-line application.
Inheritance
System.Object
SimpleConsoleCommandTracer
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Moraware.JobTrackerAPI5.DevelopmentAssistance
Assembly: JobTrackerAPI5.dll
Syntax
public class SimpleConsoleCommandTracer : ICommandTracer
Constructors
SimpleConsoleCommandTracer(SimpleConsoleCommandTracer.JTTraceOptions_Enum)
Declaration
public SimpleConsoleCommandTracer(SimpleConsoleCommandTracer.JTTraceOptions_Enum traceOption_ = SimpleConsoleCommandTracer.JTTraceOptions_Enum.CommandAndResponse_TraceOption)
Parameters
| Type | Name | Description |
|---|---|---|
| SimpleConsoleCommandTracer.JTTraceOptions_Enum | traceOption_ | Indicates what will be written to the console. |
SimpleConsoleCommandTracer(Boolean, Boolean)
Declaration
public SimpleConsoleCommandTracer(bool traceCommand_, bool traceResponse_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | traceCommand_ | Indicates whether commands will be traced. |
| System.Boolean | traceResponse_ | Indicates whether responses will be traced. |
Properties
TraceCommand
Indicates whether commands will be traced.
Declaration
public bool TraceCommand { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
TraceOption
Indicates what will be written to the console.
Declaration
public SimpleConsoleCommandTracer.JTTraceOptions_Enum TraceOption { get; set; }
Property Value
| Type | Description |
|---|---|
| SimpleConsoleCommandTracer.JTTraceOptions_Enum |
TraceResponse
Indicates whether responses will be traced.
Declaration
public bool TraceResponse { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
Command(String, String)
Called before a command is issued.
Declaration
public void Command(string commandDescription_, string command_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | commandDescription_ | Description of the command. |
| System.String | command_ | Content of the command. |
CommandResponse(String, String)
Called after a command has been issued and successfully processed by the server.
Declaration
public void CommandResponse(string commandDescription_, string response_)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | commandDescription_ | Description of the command that generated the response. |
| System.String | response_ | Content of the response. |