• 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 Script

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

Constructors

| Improve this Doc View Source

Script(EventHandler<LogUpdateEventArgs>, EventHandler<StatusUpdateEventArgs>)

Declaration
protected Script(EventHandler<LogUpdateEventArgs> onLogUpdate, EventHandler<StatusUpdateEventArgs> onStatusUpdate)
Parameters
Type Name Description
EventHandler<LogUpdateEventArgs> onLogUpdate
EventHandler<StatusUpdateEventArgs> onStatusUpdate
| Improve this Doc View Source

Script(String, EventHandler<LogUpdateEventArgs>, EventHandler<StatusUpdateEventArgs>, Boolean)

Creates a new script instance using the given script file.

Declaration
public Script(string path, EventHandler<LogUpdateEventArgs> onLogUpdate, EventHandler<StatusUpdateEventArgs> onStatusUpdate, bool autoStart = true)
Parameters
Type Name Description
System.String path

Path to the script file (yaml).

EventHandler<LogUpdateEventArgs> onLogUpdate

This event will be fired each time a new log entry has been generated.

EventHandler<StatusUpdateEventArgs> onStatusUpdate

This event will be fired fired each time a script completes an execution step (header(1) -> init(1) -> setup() -> copy_detector(1) -> pre() -> body() -> post() -> teardown(*) -> end(1)).

System.Boolean autoStart

This script will start just after beeing loaded, otherwise the Start() method should be invoked.

| Improve this Doc View Source

Script(String, EventHandler<LogUpdateEventArgs>, Boolean)

Declaration
public Script(string path, EventHandler<LogUpdateEventArgs> onLogUpdate, bool autoStart = true)
Parameters
Type Name Description
System.String path
EventHandler<LogUpdateEventArgs> onLogUpdate
System.Boolean autoStart
| Improve this Doc View Source

Script(String, Boolean)

Declaration
public Script(string path, bool autoStart = true)
Parameters
Type Name Description
System.String path
System.Boolean autoStart

Properties

| Improve this Doc View Source

AppConfigName

The root app's configuration folder name.

Declaration
protected string AppConfigName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

AppConfigPath

The current app's configuration folder path.

Declaration
protected string AppConfigPath { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

AppFolderName

The root app's execution folder name.

Declaration
protected string AppFolderName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

AppFolderPath

The root app's execution folder path.

Declaration
protected string AppFolderPath { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

AppTempName

The root app's temporary folder name.

Declaration
protected string AppTempName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

AppTempPath

The current app's temporary folder path.

Declaration
protected string AppTempPath { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

AppUtilsName

The root app's utils folder name.

Declaration
protected string AppUtilsName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

AppUtilsPath

The current app's utils folder path.

Declaration
protected string AppUtilsPath { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

BatchCaption

The current script caption defined within the YAML file.

Declaration
protected string BatchCaption { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Concurrent

Batch mode only: maximum concurrent script execution (0 = MAX).

Declaration
protected int Concurrent { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

CurrentDirSeparator

The host name or IP address for the current execution.

Declaration
protected char CurrentDirSeparator { get; }
Property Value
Type Description
System.Char
| Improve this Doc View Source

CurrentFileName

The current file name where the script is targeting right now (local or remote); can change during the execution for batch-typed.

Declaration
protected string CurrentFileName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

CurrentFilePath

The current file path where the script is targeting right now (local or remote); can change during the execution for batch-typed.

Declaration
protected string CurrentFilePath { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

CurrentFolderName

The current folder name where the script is targeting right now (local or remote); can change during the execution for batch-typed.

Declaration
protected string CurrentFolderName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

CurrentFolderPath

The current folder path where the script is targeting right now (local or remote); can change during the execution for batch-typed.

Declaration
protected string CurrentFolderPath { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

CurrentHost

The host name or IP address for the current execution.

Declaration
protected string CurrentHost { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

CurrentOS

The current OS family.

Declaration
protected Utils.OS CurrentOS { get; }
Property Value
Type Description
Utils.OS
| Improve this Doc View Source

CurrentPassword

The password for the current execution.

Declaration
protected string CurrentPassword { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

CurrentPort

The port for the current execution.

Declaration
protected int CurrentPort { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

CurrentQuestion

The current question (and subquestion) number (1, 2, 2.1, etc.)

Declaration
protected string CurrentQuestion { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

CurrentScore

The current question (and subquestion) score

Declaration
protected float CurrentScore { get; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

CurrentTarget

Only for batch mode: returns the kind of the current batch execution: none, local or remote.

Declaration
protected string CurrentTarget { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

CurrentUser

The username for the current execution.

Declaration
protected string CurrentUser { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ExecutionFolderName

The current app's execution folder name.

Declaration
protected string ExecutionFolderName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ExecutionFolderPath

The current app's execution folder path.

Declaration
protected string ExecutionFolderPath { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

LogFileName

The current log file (the file name)

Declaration
protected string LogFileName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

LogFilePath

The current log file (the entire path)

Declaration
protected string LogFilePath { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

LogFiles

Output instance used to display messages.

Declaration
public List<string> LogFiles { get; }
Property Value
Type Description
List<System.String>
| Improve this Doc View Source

LogFolderName

The current log folder (the folder name)

Declaration
protected string LogFolderName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

LogFolderPath

The current log folder (the entire path)

Declaration
protected string LogFolderPath { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

MaxScore

Maximum score possible

Declaration
protected float MaxScore { get; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

Now

The current datetime.

Declaration
protected string Now { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Output

Output instance used to display messages.

Declaration
public Output Output { get; }
Property Value
Type Description
Output
| Improve this Doc View Source

Result

Last executed command's result.

Declaration
protected string Result { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ScriptCaption

The current script caption defined within the YAML file.

Declaration
protected string ScriptCaption { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ScriptFileName

The script file name.

Declaration
protected string ScriptFileName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ScriptFilePath

The script file path.

Declaration
protected string ScriptFilePath { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ScriptFolderName

The script folder name.

Declaration
protected string ScriptFolderName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ScriptFolderPath

The script folder path.

Declaration
protected string ScriptFolderPath { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ScriptName

The current script name defined within the YAML file, otherwise the YAML file name.

Declaration
protected string ScriptName { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

ScriptVersion

The current script version defined within the YAML file, otherwise the YAML file name.

Declaration
protected string ScriptVersion { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

SingleCaption

The current script caption defined within the YAML file.

Declaration
protected string SingleCaption { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

TotalScore

The accumulated score (over 10 points), which will be updated on each CloseQuestion() call.

Declaration
protected float TotalScore { get; }
Property Value
Type Description
System.Single

Methods

| Improve this Doc View Source

ForEachChild<T>(YamlNode, Action<String, T>, Boolean)

Declaration
protected void ForEachChild<T>(YamlNode node, Action<string, T> action, bool parseEmpty = true)
    where T : YamlNode
Parameters
Type Name Description
YamlNode node
Action<System.String, T> action
System.Boolean parseEmpty
Type Parameters
Name Description
T
| Improve this Doc View Source

GetTargetData()

Returns the current YAML

Declaration
public Dictionary<string, object> GetTargetData()
Returns
Type Description
Dictionary<System.String, System.Object>
| Improve this Doc View Source

LoadYamlFile(String)

Declaration
protected YamlStream LoadYamlFile(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
YamlStream
| Improve this Doc View Source

OverrideTarget(Dictionary<String, String>, Dictionary<String, String>)

Overrides the current target data with the given one.

Declaration
public void OverrideTarget(Dictionary<string, string> target, Dictionary<string, string> vars = null)
Parameters
Type Name Description
Dictionary<System.String, System.String> target

Target data to override.

Dictionary<System.String, System.String> vars

Vars data to override.

| Improve this Doc View Source

Start()

Manually starts the script execution

Declaration
public void Start()

Extension Methods

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