Skip to content

Commit b64946d

Browse files
committed
Update docs
1 parent 53b3e7a commit b64946d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs-src/commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Commands
22

33
Commands can be C# classes, lambda expressions, or CLI programs.
4-
They can be queued, scheduled, or from the command line.
4+
They can be queued, scheduled, or run from the command line.
55

66
## Create a Command
77

docs/commands/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@
557557

558558
<h1 id="commands">Commands<a class="headerlink" href="#commands" title="Permanent link">&para;</a></h1>
559559
<p>Commands can be C# classes, lambda expressions, or CLI programs.
560-
They can be queued, scheduled, or from the command line.</p>
560+
They can be queued, scheduled, or run from the command line.</p>
561561
<h2 id="create-a-command">Create a Command<a class="headerlink" href="#create-a-command" title="Permanent link">&para;</a></h2>
562562
<p>The InEngine.Core package is required to create a C# class command.
563563
Install it in a Visual Studio project.</p>

docs/images/commands.png

587 KB
Loading

docs/search/search_index.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
},
2828
{
2929
"location": "/commands/",
30-
"text": "Commands\n\n\nCommands can be C# classes, lambda expressions, or CLI programs.\nThey can be queued, scheduled, or from the command line.\n\n\nCreate a Command\n\n\nThe InEngine.Core package is required to create a C# class command. \nInstall it in a Visual Studio project.\n\n\nPackage Manager\n\n\nInstall-Package InEngine.Core\n\n\n\n\n\nNuget CLI\n\n\nnuget install InEgine.Core\n\n\n\n\n\n.NET CLI\n\n\ndotnet add package InEngine.Core\n\n\n\n\n\nPaket CLI\n\n\npaket add InEngine.Core\n\n\n\n\n\nTo create a class command, extend the \nInEngine.Core.AbstractCommand\n class.\nMinimally, the Run method should be overridden.\n\n\nusing\n \nSystem\n;\n\n\nusing\n \nInEngine.Core\n;\n\n\n\nnamespace\n \nMyCommandPlugin\n\n\n{\n\n \npublic\n \nclass\n \nMyCommand\n \n:\n \nAbstractCommand\n\n \n{\n\n \npublic\n \noverride\n \nvoid\n \nRun\n()\n\n \n{\n\n \nConsole\n.\nWriteLine\n(\nHello, world!\n);\n\n \n}\n\n \n}\n\n\n}\n\n\n\n\n\n\nRun a Command\n\n\nCreate a class that extends \nInEngine.Core.AbstractPlugin\n in the same assembly as the command class.\nAdd a VerbOptions attribute, from the CommandLine namespace, that defines the name of the command. \n\n\nusing\n \nCommandLine\n;\n\n\nusing\n \nCommandLine.Text\n;\n\n\nusing\n \nInEngine.Core\n;\n\n\n\nnamespace\n \nMyCommandPlugin\n\n\n{\n\n \npublic\n \nclass\n \nMyPlugin\n \n:\n \nAbstractPlugin\n\n \n{\n\n\n [VerbOption(\nmy-command\n, HelpText=\nMy example command.\n)]\n\n \npublic\n \nMyCommand\n \nMyCommand\n \n{\n \nget\n;\n \nset\n;\n \n}\n\n \n}\n\n\n}\n\n\n\n\n\n\nDownload the InEngine binary distribution, from the \nGitHub Releases\n page, that matches the version of the InEngine.Core package you included.\n\n\nCopy your project's DLLs into the Plugins subdirectory included in the binary distribution. \nAdd your plugin to the \n\"Plugins\" list in appsettings.config\n at the root of the binary distribution.\n\n\nRun your command:\n\n\ninengine.exe my-command\n\n\n\n\n\nWriting Output\n\n\nThe \nInEngine.Core.AbstractCommand\n class provides some helper functions to output text to the console, for example:\n\n\npublic\n \noverride\n \nvoid\n \nRun\n()\n\n\n{\n\n \nLine\n(\nDisplay some information\n);\n\n\n}\n\n\n\n\n\n\nAll of these commands append a newline to the end of the specified text:\n\n\nLine\n(\nThis is some text\n);\n \n// Text color is white\n\n\nInfo\n(\nSomething good happened\n);\n \n// Text color is green\n\n\nWarning\n(\nSomething not so good happened\n);\n \n// Text color is yellow\n\n\nError\n(\nSomething bad happened\n);\n \n// Text color is red\n\n\n\n\n\n\nThese commands are similar, but they do not append a newline:\n\n\nText\n(\nThis is some text\n);\n \n// Text color is white\n\n\nInfoText\n(\nSomething good happened\n);\n \n// Text color is green\n\n\nWarningText\n(\nSomething not so good happened\n);\n \n// Text color is yellow\n\n\nErrorText\n(\nSomething bad happened\n);\n \n// Text color is red\n\n\n\n\n\n\nYou can also display newlines:\n\n\nNewline\n();\n \n// 1 newline\n\n\nNewline\n(\n5\n);\n \n// 5 newlines\n\n\nNewline\n(\n10\n);\n \n// 10 newlines\n\n\n\n\n\n\nThe methods can be chained together:\n\n\nInfoText\n(\nYou have this many things: \n)\n\n \n.\nLine\n(\n23\n)\n\n \n.\nNewLine\n(\n2\n)\n\n \n.\nInfoText\n(\nYou have this many other things: \n)\n\n \n.\nLine\n(\n34\n)\n\n \n.\nNewLine\n(\n2\n);\n \n\n\n\n\n\nProgress Bar\n\n\nThe \nInEngine.Core.AbstractCommand\n class provides a ProgressBar property to show command progress in a terminal.\nThis is how it is used:\n\n\npublic\n \noverride\n \nvoid\n \nRun\n()\n\n\n{\n\n \n// Define the ticks (aka steps) for the command...\n\n \nvar\n \nmaxTicks\n \n=\n \n100000\n;\n\n \nSetProgressBarMaxTicks\n(\nmaxTicks\n);\n\n\n \n// Do some work...\n\n \nfor\n \n(\nvar\n \ni\n \n=\n \n0\n;\n \ni\n \n=\n \nmaxTicks\n;\ni\n++)\n\n \n{\n\n \n// Update the command\ns progress\n\n \nUpdateProgress\n(\ni\n);\n\n \n}\n\n\n}\n\n\n\n\n\n\nExecuting Arbitrary Processes\n\n\nIt isn't necessary to create C# classes to utilize InEngine.NET.\nArbitrary commands can be run, with an argument list by leveraging the InEngine.Core plugin's \nproc\n command.\nThe command lists directory contents using \"ls\" with the \"-lhp\" switches:\n\n\ninengine.exe proc -c\n/bin/ls\n -a\n-lhp\n\n\n\n\n\n\nView Commands\n\n\nRun inengine.exe with no arguments to see a list of commands:\n\n\ninengine.exe\n\n\n\n\n\n\n\n\n\nInEngine.Core is a Plugin\n\n\nThe \nInEngine.Core\n library is itself a plugin that contains queueing, scheduling, and other commands. \n\n\n\n\nView a Command's Help Text\n\n\nRun the command with the -h or --help arguments.\n\n\ninengine.exe queue:publish -h\n\n\n\n\n\nThe \nInEngine.Core\n plugin's command to clear the InEngine.NET queues produces this help message. \n\n\nInEngine 3.x\nCopyright \u00a9 2017 Ethan Hann\n\n --command-plugin Required. The name of a command plugin file, e.g. \n InEngine.Core\n\n --command-verb A plugin command verb, e.g. echo\n\n --command-class A command class name, e.g. \n InEngine.Core.Commands.AlwaysSucceed. Takes precedence \n over --command-verb if both are specified.\n\n --args An optional list of arguments to publish with the \n command.\n\n --secondary (Default: False) Publish the command to the secondary \n queue.\n\n\n\n\n\nLogging\n\n\nAny exceptions thrown by a command will be logged provided NLog is configured to record errors. \nThe \nNLog configuration\n file needs to be setup with something like this: \n\n\n?xml version=\n1.0\n encoding=\nutf-8\n ?\n\n\nnlog\n \nxmlns=\nhttp://www.nlog-project.org/schemas/NLog.xsd\n\n \nxmlns:xsi=\nhttp://www.w3.org/2001/XMLSchema-instance\n\n\n \ntargets\n\n \ntarget\n \nname=\nlogfile\n \nxsi:type=\nFile\n \nfileName=\ninengine.log\n \n/\n\n \n/targets\n\n\n \nrules\n\n \nlogger\n \nname=\n*\n \nminlevel=\nError\n \nwriteTo=\nlogfile\n \n/\n\n \n/rules\n\n\n/nlog",
30+
"text": "Commands\n\n\nCommands can be C# classes, lambda expressions, or CLI programs.\nThey can be queued, scheduled, or run from the command line.\n\n\nCreate a Command\n\n\nThe InEngine.Core package is required to create a C# class command. \nInstall it in a Visual Studio project.\n\n\nPackage Manager\n\n\nInstall-Package InEngine.Core\n\n\n\n\n\nNuget CLI\n\n\nnuget install InEgine.Core\n\n\n\n\n\n.NET CLI\n\n\ndotnet add package InEngine.Core\n\n\n\n\n\nPaket CLI\n\n\npaket add InEngine.Core\n\n\n\n\n\nTo create a class command, extend the \nInEngine.Core.AbstractCommand\n class.\nMinimally, the Run method should be overridden.\n\n\nusing\n \nSystem\n;\n\n\nusing\n \nInEngine.Core\n;\n\n\n\nnamespace\n \nMyCommandPlugin\n\n\n{\n\n \npublic\n \nclass\n \nMyCommand\n \n:\n \nAbstractCommand\n\n \n{\n\n \npublic\n \noverride\n \nvoid\n \nRun\n()\n\n \n{\n\n \nConsole\n.\nWriteLine\n(\nHello, world!\n);\n\n \n}\n\n \n}\n\n\n}\n\n\n\n\n\n\nRun a Command\n\n\nCreate a class that extends \nInEngine.Core.AbstractPlugin\n in the same assembly as the command class.\nAdd a VerbOptions attribute, from the CommandLine namespace, that defines the name of the command. \n\n\nusing\n \nCommandLine\n;\n\n\nusing\n \nCommandLine.Text\n;\n\n\nusing\n \nInEngine.Core\n;\n\n\n\nnamespace\n \nMyCommandPlugin\n\n\n{\n\n \npublic\n \nclass\n \nMyPlugin\n \n:\n \nAbstractPlugin\n\n \n{\n\n\n [VerbOption(\nmy-command\n, HelpText=\nMy example command.\n)]\n\n \npublic\n \nMyCommand\n \nMyCommand\n \n{\n \nget\n;\n \nset\n;\n \n}\n\n \n}\n\n\n}\n\n\n\n\n\n\nDownload the InEngine binary distribution, from the \nGitHub Releases\n page, that matches the version of the InEngine.Core package you included.\n\n\nCopy your project's DLLs into the Plugins subdirectory included in the binary distribution. \nAdd your plugin to the \n\"Plugins\" list in appsettings.config\n at the root of the binary distribution.\n\n\nRun your command:\n\n\ninengine.exe my-command\n\n\n\n\n\nWriting Output\n\n\nThe \nInEngine.Core.AbstractCommand\n class provides some helper functions to output text to the console, for example:\n\n\npublic\n \noverride\n \nvoid\n \nRun\n()\n\n\n{\n\n \nLine\n(\nDisplay some information\n);\n\n\n}\n\n\n\n\n\n\nAll of these commands append a newline to the end of the specified text:\n\n\nLine\n(\nThis is some text\n);\n \n// Text color is white\n\n\nInfo\n(\nSomething good happened\n);\n \n// Text color is green\n\n\nWarning\n(\nSomething not so good happened\n);\n \n// Text color is yellow\n\n\nError\n(\nSomething bad happened\n);\n \n// Text color is red\n\n\n\n\n\n\nThese commands are similar, but they do not append a newline:\n\n\nText\n(\nThis is some text\n);\n \n// Text color is white\n\n\nInfoText\n(\nSomething good happened\n);\n \n// Text color is green\n\n\nWarningText\n(\nSomething not so good happened\n);\n \n// Text color is yellow\n\n\nErrorText\n(\nSomething bad happened\n);\n \n// Text color is red\n\n\n\n\n\n\nYou can also display newlines:\n\n\nNewline\n();\n \n// 1 newline\n\n\nNewline\n(\n5\n);\n \n// 5 newlines\n\n\nNewline\n(\n10\n);\n \n// 10 newlines\n\n\n\n\n\n\nThe methods can be chained together:\n\n\nInfoText\n(\nYou have this many things: \n)\n\n \n.\nLine\n(\n23\n)\n\n \n.\nNewLine\n(\n2\n)\n\n \n.\nInfoText\n(\nYou have this many other things: \n)\n\n \n.\nLine\n(\n34\n)\n\n \n.\nNewLine\n(\n2\n);\n \n\n\n\n\n\nProgress Bar\n\n\nThe \nInEngine.Core.AbstractCommand\n class provides a ProgressBar property to show command progress in a terminal.\nThis is how it is used:\n\n\npublic\n \noverride\n \nvoid\n \nRun\n()\n\n\n{\n\n \n// Define the ticks (aka steps) for the command...\n\n \nvar\n \nmaxTicks\n \n=\n \n100000\n;\n\n \nSetProgressBarMaxTicks\n(\nmaxTicks\n);\n\n\n \n// Do some work...\n\n \nfor\n \n(\nvar\n \ni\n \n=\n \n0\n;\n \ni\n \n=\n \nmaxTicks\n;\ni\n++)\n\n \n{\n\n \n// Update the command\ns progress\n\n \nUpdateProgress\n(\ni\n);\n\n \n}\n\n\n}\n\n\n\n\n\n\nExecuting Arbitrary Processes\n\n\nIt isn't necessary to create C# classes to utilize InEngine.NET.\nArbitrary commands can be run, with an argument list by leveraging the InEngine.Core plugin's \nproc\n command.\nThe command lists directory contents using \"ls\" with the \"-lhp\" switches:\n\n\ninengine.exe proc -c\n/bin/ls\n -a\n-lhp\n\n\n\n\n\n\nView Commands\n\n\nRun inengine.exe with no arguments to see a list of commands:\n\n\ninengine.exe\n\n\n\n\n\n\n\n\n\nInEngine.Core is a Plugin\n\n\nThe \nInEngine.Core\n library is itself a plugin that contains queueing, scheduling, and other commands. \n\n\n\n\nView a Command's Help Text\n\n\nRun the command with the -h or --help arguments.\n\n\ninengine.exe queue:publish -h\n\n\n\n\n\nThe \nInEngine.Core\n plugin's command to clear the InEngine.NET queues produces this help message. \n\n\nInEngine 3.x\nCopyright \u00a9 2017 Ethan Hann\n\n --command-plugin Required. The name of a command plugin file, e.g. \n InEngine.Core\n\n --command-verb A plugin command verb, e.g. echo\n\n --command-class A command class name, e.g. \n InEngine.Core.Commands.AlwaysSucceed. Takes precedence \n over --command-verb if both are specified.\n\n --args An optional list of arguments to publish with the \n command.\n\n --secondary (Default: False) Publish the command to the secondary \n queue.\n\n\n\n\n\nLogging\n\n\nAny exceptions thrown by a command will be logged provided NLog is configured to record errors. \nThe \nNLog configuration\n file needs to be setup with something like this: \n\n\n?xml version=\n1.0\n encoding=\nutf-8\n ?\n\n\nnlog\n \nxmlns=\nhttp://www.nlog-project.org/schemas/NLog.xsd\n\n \nxmlns:xsi=\nhttp://www.w3.org/2001/XMLSchema-instance\n\n\n \ntargets\n\n \ntarget\n \nname=\nlogfile\n \nxsi:type=\nFile\n \nfileName=\ninengine.log\n \n/\n\n \n/targets\n\n\n \nrules\n\n \nlogger\n \nname=\n*\n \nminlevel=\nError\n \nwriteTo=\nlogfile\n \n/\n\n \n/rules\n\n\n/nlog",
3131
"title": "Commands"
3232
},
3333
{
3434
"location": "/commands/#commands",
35-
"text": "Commands can be C# classes, lambda expressions, or CLI programs.\nThey can be queued, scheduled, or from the command line.",
35+
"text": "Commands can be C# classes, lambda expressions, or CLI programs.\nThey can be queued, scheduled, or run from the command line.",
3636
"title": "Commands"
3737
},
3838
{

0 commit comments

Comments
 (0)