Skip to content

Commit 4dae47b

Browse files
committed
Update docs
1 parent b38827c commit 4dae47b

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

docs-src/commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ using InEngine.Core;
5454

5555
namespace MyCommandPlugin
5656
{
57-
public class MyCommand : ICommand
57+
public class MyCommand : AbstractCommand
5858
{
5959
public override CommandResult Run()
6060
{

docs/commands/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ <h2 id="create-a-command">Create a Command</h2>
154154

155155
namespace MyCommandPlugin
156156
{
157-
public class MyCommand : ICommand
157+
public class MyCommand : AbstractCommand
158158
{
159159
public override CommandResult Run()
160160
{

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,5 @@ <h4 class="modal-title" id="exampleModalLabel">Search</h4>
146146

147147
<!--
148148
MkDocs version : 0.16.3
149-
Build Date UTC : 2017-11-22 03:38:12
149+
Build Date UTC : 2017-11-22 12:35:05
150150
-->

docs/mkdocs/search_index.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
{
1919
"location": "/commands/",
20-
"text": "Commands\n\n\nCommands are the fundamental abstraction used to run custom logic.\n\n\nCreate a Command\n\n\nThe InEngine.Core package is required. Install it into your own Visual Studio project.\n\n\nPackage Manager\n\n\nInstall-Package InEngine.Core\n\n\n\n\nNuget CLI\n\n\nnuget install InEgine.Core\n\n\n\n\n.NET CLI\n\n\ndotnet add package InEngine.Core\n\n\n\n\nPaket CLI\n\n\npaket add InEngine.Core\n\n\n\n\nAdding a class that implements \nInEngine.Core.ICommand\n is the simplest way to create a command.\n\n\nusing System;\nusing InEngine.Core;\n\nnamespace MyCommandPlugin\n{\n public class MyCommand : ICommand\n {\n public CommandResult Run()\n {\n Console.WriteLine(\nHello, world!\n);\n return new CommandResult(true);\n }\n }\n}\n\n\n\n\nExtending the \nInEngine.Core.AbstractCommand\n class adds extra functionality, like a logger, a progress bar, and the ability to schedule the command using the scheduler.\nMinimally, the Run method should be overridden.\n\n\nusing System;\nusing InEngine.Core;\n\nnamespace MyCommandPlugin\n{\n public class MyCommand : ICommand\n {\n public override CommandResult Run()\n {\n Console.WriteLine(\nHello, world!\n);\n return new CommandResult(true);\n }\n }\n}\n\n\n\n\nRun a Command\n\n\nCreate a class that implements \nInEngine.Core.IOptions\n in the same assembly as the command class.\nAdd a VerbOptions attribute from the CommandLine namespace that defines the name of the command and optional help text.\nThe help text can be auto-generated from the attribute or manually specified in the GetUsage method. \n\n\nusing CommandLine;\nusing CommandLine.Text;\nusing InEngine.Core;\n\nnamespace MyCommandPlugin\n{\n public class MyOptions : IOptions\n {\n [VerbOption(\nmy-command\n, HelpText=\nMy example command.\n)]\n public MyCommand MyCommand { get; set; }\n\n [HelpVerbOption]\n public string GetUsage(string verb)\n {\n return HelpText.AutoBuild(this, verb);\n }\n }\n}\n\n\n\n\nDownload the InEngineCli tool that matches the version of the InEngine.Core package you included from the \nGitHub Releases\n page.\n\n\nCopy your project's DLLs into the same directory as InEngineCli.exe.\n\n\nRun your command...\n\n\nInEngineCli.exe -pMyCommandPlugin my-command\n\n\n\n\nDiscover Command Plugins\n\n\nRun InEngineCli.exe without any arguments to see a list of arguments.\n\n\n\n ___ _____ _ _ _ _____ _____ \n |_ _|_ __ | ____|_ __ __ _(_)_ __ ___ | \\ | | ____|_ _|\n | || '_ \\| _| | '_ \\ / _` | | '_ \\ / _ \\ | \\| | _| | | \n | || | | | |___| | | | (_| | | | | | __/_| |\\ | |___ | | \n |___|_| |_|_____|_| |_|\\__, |_|_| |_|\\___(_|_| \\_|_____| |_| \n |___/ \n\nUsage:\n -p[\nplugin_name\n] [\ncommand_name\n]\n\nPlugins:\n InEngine.Commands\n InEngine.Core\n\n\n\n\n\nDiscover Commands in a Plugin\n\n\nRun InEngineCli.exe with only the plugin specified.\n\n\nInEngineCli.exe -pInEngine.Core\n\n\n\n\nThe \nInEngine.Core\n library is itself a plugin that contains queue related commands. \nAs an example, this is the help output for the core plugin.\n\n\n\n ___ _____ _ _ _ _____ _____ \n |_ _|_ __ | ____|_ __ __ _(_)_ __ ___ | \\ | | ____|_ _|\n | || '_ \\| _| | '_ \\ / _` | | '_ \\ / _ \\ | \\| | _| | | \n | || | | | |___| | | | (_| | | | | | __/_| |\\ | |___ | | \n |___|_| |_|_____|_| |_|\\__, |_|_| |_|\\___(_|_| \\_|_____| |_| \n |___/ \n\nPlugin: InEngine.Core\n\nCommands:\n null A null operation command. Literally does nothing.\n echo Echo some text to the console. Useful for end-to-end testing.\n queue:publish Publish a command message to a queue.\n queue:consume Consume one or more command messages from the queue.\n queue:length Get the number of messages in the primary and secondary queues.\n queue:clear Clear the primary and secondary queues.\n\n\n\n\nPrint Help Text for a Plugin's Commands\n\n\nRun the command with the -h or --help arguments.\n\n\nInEngineCli.exe -pInEngine.Core queue:clear -h\n\n\n\n\nThe \nInEngine.Core\n plugin's command to clear the InEngine.NET's queues produces this help message. \n\n\nInEngine 3.x\nCopyright \u00a9 Ethan Hann 2017\n\n --processing-queue Clear the processing queue.\n\n --secondary Clear the secondary queue.\n\n\n\n\nWriting Output\n\n\nThe \nInEngine.Core.AbstractCommand\n class provides some helper functions to output text to the console: \n\n\nIWrite Newline();\nIWrite Info(string val);\nIWrite Warning(string val);\nIWrite Error(string val);\nIWrite Line(string val);\n\n\n\n\npublic override CommandResult Run()\n{\n Info(\nDisplay some information\n);\n}\n\n\n\n\nDisplay an error message, use the Error method.\n\n\nError(\nDisplay some information\n);\n\n\n\n\nDisplay a warning message, use the Warning method.\n\n\nError(\nDisplay some information\n);\n\n\n\n\nInfo, Error, and Warning messages are display in green, red, and yellow, respectively.\nIf you want to display an uncolored line, use the Line method. \nLine(\"This is a plain line.\");\n\n\nLogging\n\n\nThe \nInEngine.Core.AbstractCommand\n class provides a Logger property. It implements the \nNLog.ILogger\n interface.\n\n\npublic override CommandResult Run()\n{\n Logger.Trace(\nSample trace message\n);\n Logger.Debug(\nSample debug message\n);\n Logger.Info(\nSample informational message\n);\n Logger.Warn(\nSample warning message\n);\n Logger.Error(\nSample error message\n);\n Logger.Fatal(\nSample fatal error message\n);\n return new CommandResult(true);\n}\n\n\n\n\nSetup an \nNLog configuration\n file, something like this...\n\n\n?xml version=\n1.0\n encoding=\nutf-8\n ?\n\n\nnlog xmlns=\nhttp://www.nlog-project.org/schemas/NLog.xsd\n\n xmlns:xsi=\nhttp://www.w3.org/2001/XMLSchema-instance\n\n\n \ntargets\n\n \ntarget name=\nlogfile\n xsi:type=\nFile\n fileName=\nfile.txt\n /\n\n \ntarget name=\nconsole\n xsi:type=\nConsole\n /\n\n \n/targets\n\n\n \nrules\n\n \nlogger name=\n*\n minlevel=\nTrace\n writeTo=\nlogfile\n /\n\n \nlogger name=\n*\n minlevel=\nInfo\n writeTo=\nconsole\n /\n\n \n/rules\n\n\n/nlog\n\n\n\n\n\nProgress Bar\n\n\nThe \nInEngine.Core.AbstractCommand\n class provides a ProgressBar property. This is how it is used.\n\n\npublic override CommandResult Run()\n{\n // Define the ticks (aka steps) for the command...\n var maxTicks = 100000;\n SetProgressBarMaxTicks(maxTicks);\n\n // Do some work...\n for (var i = 0; i \n= maxTicks;i++)\n {\n // Update the command's progress\n UpdateProgress(i);\n }\n\n return new CommandResult(true);\n}",
20+
"text": "Commands\n\n\nCommands are the fundamental abstraction used to run custom logic.\n\n\nCreate a Command\n\n\nThe InEngine.Core package is required. Install it into your own Visual Studio project.\n\n\nPackage Manager\n\n\nInstall-Package InEngine.Core\n\n\n\n\nNuget CLI\n\n\nnuget install InEgine.Core\n\n\n\n\n.NET CLI\n\n\ndotnet add package InEngine.Core\n\n\n\n\nPaket CLI\n\n\npaket add InEngine.Core\n\n\n\n\nAdding a class that implements \nInEngine.Core.ICommand\n is the simplest way to create a command.\n\n\nusing System;\nusing InEngine.Core;\n\nnamespace MyCommandPlugin\n{\n public class MyCommand : ICommand\n {\n public CommandResult Run()\n {\n Console.WriteLine(\nHello, world!\n);\n return new CommandResult(true);\n }\n }\n}\n\n\n\n\nExtending the \nInEngine.Core.AbstractCommand\n class adds extra functionality, like a logger, a progress bar, and the ability to schedule the command using the scheduler.\nMinimally, the Run method should be overridden.\n\n\nusing System;\nusing InEngine.Core;\n\nnamespace MyCommandPlugin\n{\n public class MyCommand : AbstractCommand\n {\n public override CommandResult Run()\n {\n Console.WriteLine(\nHello, world!\n);\n return new CommandResult(true);\n }\n }\n}\n\n\n\n\nRun a Command\n\n\nCreate a class that implements \nInEngine.Core.IOptions\n in the same assembly as the command class.\nAdd a VerbOptions attribute from the CommandLine namespace that defines the name of the command and optional help text.\nThe help text can be auto-generated from the attribute or manually specified in the GetUsage method. \n\n\nusing CommandLine;\nusing CommandLine.Text;\nusing InEngine.Core;\n\nnamespace MyCommandPlugin\n{\n public class MyOptions : IOptions\n {\n [VerbOption(\nmy-command\n, HelpText=\nMy example command.\n)]\n public MyCommand MyCommand { get; set; }\n\n [HelpVerbOption]\n public string GetUsage(string verb)\n {\n return HelpText.AutoBuild(this, verb);\n }\n }\n}\n\n\n\n\nDownload the InEngineCli tool that matches the version of the InEngine.Core package you included from the \nGitHub Releases\n page.\n\n\nCopy your project's DLLs into the same directory as InEngineCli.exe.\n\n\nRun your command...\n\n\nInEngineCli.exe -pMyCommandPlugin my-command\n\n\n\n\nDiscover Command Plugins\n\n\nRun InEngineCli.exe without any arguments to see a list of arguments.\n\n\n\n ___ _____ _ _ _ _____ _____ \n |_ _|_ __ | ____|_ __ __ _(_)_ __ ___ | \\ | | ____|_ _|\n | || '_ \\| _| | '_ \\ / _` | | '_ \\ / _ \\ | \\| | _| | | \n | || | | | |___| | | | (_| | | | | | __/_| |\\ | |___ | | \n |___|_| |_|_____|_| |_|\\__, |_|_| |_|\\___(_|_| \\_|_____| |_| \n |___/ \n\nUsage:\n -p[\nplugin_name\n] [\ncommand_name\n]\n\nPlugins:\n InEngine.Commands\n InEngine.Core\n\n\n\n\n\nDiscover Commands in a Plugin\n\n\nRun InEngineCli.exe with only the plugin specified.\n\n\nInEngineCli.exe -pInEngine.Core\n\n\n\n\nThe \nInEngine.Core\n library is itself a plugin that contains queue related commands. \nAs an example, this is the help output for the core plugin.\n\n\n\n ___ _____ _ _ _ _____ _____ \n |_ _|_ __ | ____|_ __ __ _(_)_ __ ___ | \\ | | ____|_ _|\n | || '_ \\| _| | '_ \\ / _` | | '_ \\ / _ \\ | \\| | _| | | \n | || | | | |___| | | | (_| | | | | | __/_| |\\ | |___ | | \n |___|_| |_|_____|_| |_|\\__, |_|_| |_|\\___(_|_| \\_|_____| |_| \n |___/ \n\nPlugin: InEngine.Core\n\nCommands:\n null A null operation command. Literally does nothing.\n echo Echo some text to the console. Useful for end-to-end testing.\n queue:publish Publish a command message to a queue.\n queue:consume Consume one or more command messages from the queue.\n queue:length Get the number of messages in the primary and secondary queues.\n queue:clear Clear the primary and secondary queues.\n\n\n\n\nPrint Help Text for a Plugin's Commands\n\n\nRun the command with the -h or --help arguments.\n\n\nInEngineCli.exe -pInEngine.Core queue:clear -h\n\n\n\n\nThe \nInEngine.Core\n plugin's command to clear the InEngine.NET's queues produces this help message. \n\n\nInEngine 3.x\nCopyright \u00a9 Ethan Hann 2017\n\n --processing-queue Clear the processing queue.\n\n --secondary Clear the secondary queue.\n\n\n\n\nWriting Output\n\n\nThe \nInEngine.Core.AbstractCommand\n class provides some helper functions to output text to the console: \n\n\nIWrite Newline();\nIWrite Info(string val);\nIWrite Warning(string val);\nIWrite Error(string val);\nIWrite Line(string val);\n\n\n\n\npublic override CommandResult Run()\n{\n Info(\nDisplay some information\n);\n}\n\n\n\n\nDisplay an error message, use the Error method.\n\n\nError(\nDisplay some information\n);\n\n\n\n\nDisplay a warning message, use the Warning method.\n\n\nError(\nDisplay some information\n);\n\n\n\n\nInfo, Error, and Warning messages are display in green, red, and yellow, respectively.\nIf you want to display an uncolored line, use the Line method. \nLine(\"This is a plain line.\");\n\n\nLogging\n\n\nThe \nInEngine.Core.AbstractCommand\n class provides a Logger property. It implements the \nNLog.ILogger\n interface.\n\n\npublic override CommandResult Run()\n{\n Logger.Trace(\nSample trace message\n);\n Logger.Debug(\nSample debug message\n);\n Logger.Info(\nSample informational message\n);\n Logger.Warn(\nSample warning message\n);\n Logger.Error(\nSample error message\n);\n Logger.Fatal(\nSample fatal error message\n);\n return new CommandResult(true);\n}\n\n\n\n\nSetup an \nNLog configuration\n file, something like this...\n\n\n?xml version=\n1.0\n encoding=\nutf-8\n ?\n\n\nnlog xmlns=\nhttp://www.nlog-project.org/schemas/NLog.xsd\n\n xmlns:xsi=\nhttp://www.w3.org/2001/XMLSchema-instance\n\n\n \ntargets\n\n \ntarget name=\nlogfile\n xsi:type=\nFile\n fileName=\nfile.txt\n /\n\n \ntarget name=\nconsole\n xsi:type=\nConsole\n /\n\n \n/targets\n\n\n \nrules\n\n \nlogger name=\n*\n minlevel=\nTrace\n writeTo=\nlogfile\n /\n\n \nlogger name=\n*\n minlevel=\nInfo\n writeTo=\nconsole\n /\n\n \n/rules\n\n\n/nlog\n\n\n\n\n\nProgress Bar\n\n\nThe \nInEngine.Core.AbstractCommand\n class provides a ProgressBar property. This is how it is used.\n\n\npublic override CommandResult Run()\n{\n // Define the ticks (aka steps) for the command...\n var maxTicks = 100000;\n SetProgressBarMaxTicks(maxTicks);\n\n // Do some work...\n for (var i = 0; i \n= maxTicks;i++)\n {\n // Update the command's progress\n UpdateProgress(i);\n }\n\n return new CommandResult(true);\n}",
2121
"title": "Commands"
2222
},
2323
{
@@ -27,7 +27,7 @@
2727
},
2828
{
2929
"location": "/commands/#create-a-command",
30-
"text": "The InEngine.Core package is required. Install it into your own Visual Studio project. Package Manager Install-Package InEngine.Core Nuget CLI nuget install InEgine.Core .NET CLI dotnet add package InEngine.Core Paket CLI paket add InEngine.Core Adding a class that implements InEngine.Core.ICommand is the simplest way to create a command. using System;\nusing InEngine.Core;\n\nnamespace MyCommandPlugin\n{\n public class MyCommand : ICommand\n {\n public CommandResult Run()\n {\n Console.WriteLine( Hello, world! );\n return new CommandResult(true);\n }\n }\n} Extending the InEngine.Core.AbstractCommand class adds extra functionality, like a logger, a progress bar, and the ability to schedule the command using the scheduler.\nMinimally, the Run method should be overridden. using System;\nusing InEngine.Core;\n\nnamespace MyCommandPlugin\n{\n public class MyCommand : ICommand\n {\n public override CommandResult Run()\n {\n Console.WriteLine( Hello, world! );\n return new CommandResult(true);\n }\n }\n}",
30+
"text": "The InEngine.Core package is required. Install it into your own Visual Studio project. Package Manager Install-Package InEngine.Core Nuget CLI nuget install InEgine.Core .NET CLI dotnet add package InEngine.Core Paket CLI paket add InEngine.Core Adding a class that implements InEngine.Core.ICommand is the simplest way to create a command. using System;\nusing InEngine.Core;\n\nnamespace MyCommandPlugin\n{\n public class MyCommand : ICommand\n {\n public CommandResult Run()\n {\n Console.WriteLine( Hello, world! );\n return new CommandResult(true);\n }\n }\n} Extending the InEngine.Core.AbstractCommand class adds extra functionality, like a logger, a progress bar, and the ability to schedule the command using the scheduler.\nMinimally, the Run method should be overridden. using System;\nusing InEngine.Core;\n\nnamespace MyCommandPlugin\n{\n public class MyCommand : AbstractCommand\n {\n public override CommandResult Run()\n {\n Console.WriteLine( Hello, world! );\n return new CommandResult(true);\n }\n }\n}",
3131
"title": "Create a Command"
3232
},
3333
{

docs/sitemap.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<url>
66
<loc>/</loc>
7-
<lastmod>2017-11-21</lastmod>
7+
<lastmod>2017-11-22</lastmod>
88
<changefreq>daily</changefreq>
99
</url>
1010

@@ -13,19 +13,19 @@
1313

1414
<url>
1515
<loc>/commands/</loc>
16-
<lastmod>2017-11-21</lastmod>
16+
<lastmod>2017-11-22</lastmod>
1717
<changefreq>daily</changefreq>
1818
</url>
1919

2020
<url>
2121
<loc>/scheduling/</loc>
22-
<lastmod>2017-11-21</lastmod>
22+
<lastmod>2017-11-22</lastmod>
2323
<changefreq>daily</changefreq>
2424
</url>
2525

2626
<url>
2727
<loc>/queuing/</loc>
28-
<lastmod>2017-11-21</lastmod>
28+
<lastmod>2017-11-22</lastmod>
2929
<changefreq>daily</changefreq>
3030
</url>
3131

0 commit comments

Comments
 (0)