IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Public Member Functions | |
Script_Misc () | |
override void | Script_AddCommands (ICommandLineApplicationInterpreter interpreter, SortedList< string, string > helpStrings) |
Adds commands to the internal interpreter. More... | |
string | TestListsOperations (string[] arguments) |
Test of lists and operations on them. More... | |
string | TestFileOperations (string[] arguments) |
Test of file operations. More... | |
string | TestSystem (string[] arguments) |
Test of system utilities. More... | |
string | TestStringParser (string[] arguments) |
Test of string parsers. More... | |
string | TestConsoleUtilities (string[] arguments) |
Test of console utilities. More... | |
string | TestSerializationJson (string[] arguments) |
Test of JSON serializer. More... | |
string | TestExpressionEvaluatorJavaScript (string[] arguments) |
JavaScript - based expression evaluator. More... | |
string | TestRegisterable_IdGenerator (string[] arguments) |
Test of Registerable classes and ID generators. More... | |
string | TestExoticAndObsolete (string[] arguments) |
Test of exotic and obsolete classes. More... | |
![]() | |
LoadableScriptBase () | |
Argument-less constructor. If argument-less constructor is called then initialization is not performed and will be performed later. More... | |
string | Run (string[] arguments) |
Performs the action of this object. Override this in derived classes! More... | |
void | Initialize (string[] arguments) |
Initializes the object. If not called explicitly, this method is automatically called at the first call to the Run method. More... | |
virtual string | Script_DefaultInitialize (string[] arguments) |
Default initialization method for scripts. More... | |
virtual string | Script_DefaultRun (string[] arguments) |
Default run method for the script. Can be used when only installed commands are run by hte script. More... | |
virtual ICommandLineApplicationInterpreter | Script_CreateInterpreterWithoutCommands () |
Creates and returns an interpreter that can be used as script's internal interpreter for running script's commands. More... | |
delegate string | Script_CommandDelegate (string[] args) |
Delegate for commands that are installed on script's internal interpreter (property Script_Interpreter). More... | |
void | Script_AddCommand (string commandName, Script_CommandDelegate command, string helpString) |
Adds a new internal script command under specified name to the internal interpreter of the current script object. More... | |
virtual void | Script_AddCommand (ICommandLineApplicationInterpreter interpreter, SortedList< string, string > helpStrings, string commandName, Script_CommandDelegate command, string helpString) |
Adds a new internal script command under specified name to the internal interpreter of the current script object. More... | |
string | Script_GetHelpString (string scriptCommandName) |
Returns help string for internal script command with specified name, or null if help string is not installed for such a command. More... | |
void | Script_PrintCommandsHelp () |
Prits help for the installed internal commands of the script. More... | |
virtual bool | Script_ContainsCommand (string commandName) |
Returns true if the internal script's interpreter contains a command with specified name, false otherwise. More... | |
virtual bool | Script_ContainsScriptCommand (string commandName) |
Returns true if the specified command is script command (i.e. its first argument is command-name and it is run through the Script_CommandAdapter object). More... | |
virtual void | Script_RemoveCommand (string commandName) |
Removes the specified internal script command from the internal interpreter of the current scripting object. More... | |
virtual void | Script_RemoveAllCommands () |
Removes ALL internal script commands from the internal interpreter of the current scripting object. More... | |
string | Script_Run (string[] arguments) |
Runs internal script command. More... | |
string | Script_Run (string commandName, params string[] otherArguments) |
Runs internal script command. More... | |
virtual void | Script_PrintArguments (string messageString, string[] arguments) |
Prints the specified array of string arguments (usually passed as command-line arguments). More... | |
Public Attributes | |
const string | ConstListOperations = "ListOperations" |
Tests of list operations. More... | |
const string | ConstHelpListOperations = "Tests of lists and operations on them." |
const string | ConstFileOperations = "FileOperations" |
Tests of file operations. More... | |
const string | ConstHelpFileOperations = "Tests of file operations." |
const string | ConstSystem = "System" |
Tests of string parsers. More... | |
const string | ConstHelpSystem = "Tests of system utilities." |
const string | ConstStringParser = "StringParser" |
Tests of string parsers. More... | |
const string | ConstHelpStringParser = "Tests of strng parser." |
const string | ConstConsoleUtilities = "ConsoleUtilities" |
Tests of console utilities. More... | |
const string | ConstHelpConsoleUtilities = "Tests of console utilities." |
const string | ConstSerializerJson = "SerializerJson" |
Test of JSON serializer. More... | |
const string | ConstHelpSerializerJson = "Tests of JSON serialization." |
const string | ConstExpressionEvaluatorJavaScript = "ExpressionEvaluatorJs" |
JavaScript - based expression evaluator. More... | |
const string | ConstHelpExpressionEvaluatorJavaScript = "Tests of JavaScript based Expression evaluator." |
const string | ConstRegisterable_IdGenerator = "Registerable_IdGenerator" |
Test of Registerable classes and ID generators. More... | |
const string | ConstHelpRegisterable_IdGenerator = "Test of IRegisterable interface and ID generator." |
const string | ConstExoticAndObsolete = "Registerable_IdGenerator" |
Test of exotic and obsolete classes. More... | |
const string | ConstHelpExoticAndObsolete = "Test of IRegisterable interface and ID generator." |
![]() | |
const string | ConstDefaultHelp = "Help" |
Default command name for help. More... | |
const string | ConstHelpDefaultUniversal = "?" |
Universal name of the help command. More... | |
const string | ConstDefaultTestScrip = "TestScript" |
Default command name for test method. More... | |
Protected Member Functions | |
override void | InitializeThis (string[] arguments) |
Initializes the current object. More... | |
override string | RunThis (string[] arguments) |
Runs action of the current object. More... | |
![]() | |
delegate string | CommandMethod (string commandName, string[] args) |
Delegate for internal command methods. More... | |
ICommandLineApplicationInterpreter | Script_CreateInterpreter () |
Creates and returns an interpreter that can be used as script's internal interpreter for running script's commands. More... | |
virtual string | Script_CommandHelp (string[] arguments) |
Prints help. More... | |
virtual string | Script_CommandTestScript (string[] arguments) |
Prints help. More... | |
Additional Inherited Members | |
![]() | |
string | _embeddedCommandName = null |
int | _outputLevel = DefaultOutputLevel |
ICommandLineApplicationInterpreter | _script_interpreter |
![]() | |
string | EmbeddedCommandName [get, set] |
Command that was used to launch the current embedded application script. More... | |
object | Lock [get] |
This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock. More... | |
string[] | InitializationArguments [get, set] |
Arguments used by the initialization method. WARNING: arguments can only be set before initialization is performed. Initialization is performed either implicitly at the first call to the Run method or explicitly by calling the Initialize method. More... | |
virtual bool | IsInitialized [get, protected set] |
Whether the object has been initialized or not. More... | |
static int | DefaultOutputLevel [get, set] |
int | OutputLevel [get, set] |
Level of output to console produced by some operations of the current object. More... | |
virtual ICommandLineApplicationInterpreter | Script_Interpreter [get, protected set] |
Script's internal interpreter that takes care for execution of installed internal commands. More... | |
SortedList< string, string > | Script_CommandHelpStrings [get] |
Contains help strings associated with script commands installed on interpreter. More... | |
![]() | |
string | EmbeddedCommandName [get, set] |
Command that was used to launch the current embedded application script. More... | |
string[] | InitializationArguments [get, set] |
Arguments used by the initialization method. More... | |
bool | IsInitialized [get] |
Whether the object has been initialized or not. More... | |
![]() | |
object | Lock [get] |
|
inline |
|
inlineprotectedvirtual |
Initializes the current object.
Implements IG.Lib.LoadableScriptBase.
|
inlineprotectedvirtual |
Runs action of the current object.
arguments | Command-line arguments of the action. |
Implements IG.Lib.LoadableScriptBase.
|
inlinevirtual |
Adds commands to the internal interpreter.
interpreter | Interpreter where commands are executed. |
helpStrings | List containg help strings. |
Reimplemented from IG.Lib.LoadableScriptBase.
|
inline |
Test of lists and operations on them.
arguments | Array of command-line arguments. |
References IG.Lib.Util.ExampleList().
|
inline |
Test of file operations.
arguments | Array of command-line arguments. |
References IG.Lib.UtilSystem.ExampleRelativePath().
|
inline |
Test of system utilities.
arguments | Array of command-line arguments. |
References IG.Lib.UtilSystem.GetComputerName(), IG.Lib.UtilSystem.GetDomainName(), IG.Lib.UtilSystem.GetIpAddressLocal(), and IG.Lib.UtilSystem.GetMacAddressFastest().
|
inline |
Test of string parsers.
arguments | Array of command-line arguments. |
References IG.Lib.Parser.Examples(), and IG.Lib.CharacterBuffer.TestSpeed().
|
inline |
Test of console utilities.
arguments | Array of command-line arguments. |
References IG.Lib.UtilConsole.Examples().
|
inline |
Test of JSON serializer.
arguments | Array of command-line arguments. |
References IG.Lib.SerializerBase.ExampleTestType(), and IG.Lib.SerializerBase.TestSerializationAll().
|
inline |
JavaScript - based expression evaluator.
arguments | Array of command-line arguments. |
References IG.Lib.ExpressionEvaluatorJs.ExampleCommandLine().
|
inline |
Test of Registerable classes and ID generators.
arguments | Array of command-line arguments. |
References IG.Lib.RegisterableExamples.ExampleIdGenerator(), and IG.Lib.RegisterableExamples.ExampleRegistrable().
|
inline |
Test of exotic and obsolete classes.
arguments | Array of command-line arguments. |
References IG.Num.Scalar.Examples().
const string IG.Script.Script_Misc.ConstListOperations = "ListOperations" |
Tests of list operations.
Referenced by TestOpt.IGLibShellExtMainProgram.TestMain(), and TestOpt.IGLibShellMainProgram.TestMain().
const string IG.Script.Script_Misc.ConstHelpListOperations = "Tests of lists and operations on them." |
const string IG.Script.Script_Misc.ConstFileOperations = "FileOperations" |
Tests of file operations.
Referenced by TestOpt.IGLibShellExtMainProgram.TestMain(), and TestOpt.IGLibShellMainProgram.TestMain().
const string IG.Script.Script_Misc.ConstHelpFileOperations = "Tests of file operations." |
const string IG.Script.Script_Misc.ConstSystem = "System" |
Tests of string parsers.
const string IG.Script.Script_Misc.ConstHelpSystem = "Tests of system utilities." |
const string IG.Script.Script_Misc.ConstStringParser = "StringParser" |
Tests of string parsers.
Referenced by TestOpt.IGLibShellExtMainProgram.TestMain(), and TestOpt.IGLibShellMainProgram.TestMain().
const string IG.Script.Script_Misc.ConstHelpStringParser = "Tests of strng parser." |
const string IG.Script.Script_Misc.ConstConsoleUtilities = "ConsoleUtilities" |
Tests of console utilities.
Referenced by TestOpt.IGLibShellExtMainProgram.TestMain(), and TestOpt.IGLibShellMainProgram.TestMain().
const string IG.Script.Script_Misc.ConstHelpConsoleUtilities = "Tests of console utilities." |
const string IG.Script.Script_Misc.ConstSerializerJson = "SerializerJson" |
Test of JSON serializer.
Referenced by TestOpt.IGLibShellExtMainProgram.TestMain(), and TestOpt.IGLibShellMainProgram.TestMain().
const string IG.Script.Script_Misc.ConstHelpSerializerJson = "Tests of JSON serialization." |
const string IG.Script.Script_Misc.ConstExpressionEvaluatorJavaScript = "ExpressionEvaluatorJs" |
JavaScript - based expression evaluator.
Referenced by TestOpt.IGLibShellExtMainProgram.TestMain(), and TestOpt.IGLibShellMainProgram.TestMain().
const string IG.Script.Script_Misc.ConstHelpExpressionEvaluatorJavaScript = "Tests of JavaScript based Expression evaluator." |
const string IG.Script.Script_Misc.ConstRegisterable_IdGenerator = "Registerable_IdGenerator" |
Test of Registerable classes and ID generators.
Referenced by TestOpt.IGLibShellExtMainProgram.TestMain(), and TestOpt.IGLibShellMainProgram.TestMain().
const string IG.Script.Script_Misc.ConstHelpRegisterable_IdGenerator = "Test of IRegisterable interface and ID generator." |
const string IG.Script.Script_Misc.ConstExoticAndObsolete = "Registerable_IdGenerator" |
Test of exotic and obsolete classes.
const string IG.Script.Script_Misc.ConstHelpExoticAndObsolete = "Test of IRegisterable interface and ID generator." |