Skip to content

Commit 0f27471

Browse files
committed
Expand getting started doc
1 parent c955463 commit 0f27471

File tree

3 files changed

+80
-37
lines changed

3 files changed

+80
-37
lines changed

docs-src/index.md

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
InEngine.NET is a background commands processing server.
44
It allows commands to be queued, scheduled, and ran directly.
55

6-
## Install
6+
## How to Get Started
7+
8+
## Create a Command
79

810
First, install the InEngine.Core package into your own Visual Studio project.
911

@@ -27,15 +29,12 @@ dotnet add package InEngine.Core
2729
paket add InEngine.Core
2830
```
2931

30-
Second, download the CLI and/or the Scheduler from a release that matches the version of the InEngine.Core package you included.
31-
32-
Releases are found on GitHub: https://github.com/InEngine-NET/InEngine.NET/releases
33-
34-
## Create a Command
35-
3632
Add a class that implements **InEngine.Core.ICommand** or extends **InEngine.Core.AbstractCommand**.
33+
The **AbstractCommand** class adds extra functionality, like a logger, a progress bar, and the ability to schedule the command using the scheduler.
34+
Minimally, the Run method should be overridden.
3735

38-
```c#
36+
```csharp
37+
using System;
3938
using InEngine.Core;
4039

4140
namespace MyCommands
@@ -44,33 +43,55 @@ namespace MyCommands
4443
{
4544
public CommandResult Run()
4645
{
46+
Console.WriteLine("Hello, world!");
4747
return new CommandResult(true);
4848
}
4949
}
5050
}
5151
```
5252

53-
The **AbstractCommand** class adds extra functionality, like a logger, a progress bar, and the ability to schedule the command using the scheduler.
54-
Minimally, the Run method should be overridden.
55-
53+
Create a class that implements **InEngine.Core.IOptions** in the same assembly as the command class.
54+
Add VerbOptions from the CommandLine namespace.
55+
The help text can be auto-generated or manually specified.
5656

57-
```c#
57+
```csharp
58+
using CommandLine;
59+
using CommandLine.Text;
5860
using InEngine.Core;
5961

60-
namespace MyCommands
62+
namespace InEngine.Commands
6163
{
62-
public class MyCommand : AbstractCommand
64+
public class MyOptions : IOptions
6365
{
64-
public override CommandResult Run()
66+
[VerbOption("my-command", HelpText="My example command.")]
67+
public MyCommand MyCommand { get; set; }
68+
69+
[HelpVerbOption]
70+
public string GetUsage(string verb)
6571
{
66-
return new CommandResult(true);
72+
return HelpText.AutoBuild(this, verb);
6773
}
6874
}
6975
}
7076
```
7177

78+
# Run the Command
79+
80+
Second, download the InEngineCli tool that matches the version of the InEngine.Core package you included from the [GitHub Releases](https://github.com/InEngine-NET/InEngine.NET/releases) page.
81+
82+
Copy your project's DLLs into the same directory as InEngineCli.exe.
83+
84+
Run your command...
85+
86+
```bash
87+
InEngineCli.exe -pMyCommands my-command
88+
```
89+
90+
91+
92+
93+
7294

73-
7495

7596

7697

docs/index.html

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,18 @@
6565
<div class="col-md-3"><div class="bs-sidebar hidden-print affix well" role="complementary">
6666
<ul class="nav bs-sidenav">
6767
<li class="main active"><a href="#what-is-this">What is this?</a></li>
68-
<li><a href="#install">Install</a></li>
68+
<li><a href="#how-to-get-started">How to Get Started</a></li>
6969
<li><a href="#create-a-command">Create a Command</a></li>
70+
<li class="main "><a href="#run-the-command">Run the Command</a></li>
7071
</ul>
7172
</div></div>
7273
<div class="col-md-9" role="main">
7374

7475
<h1 id="what-is-this">What is this?</h1>
7576
<p>InEngine.NET is a background commands processing server.
7677
It allows commands to be queued, scheduled, and ran directly. </p>
77-
<h2 id="install">Install</h2>
78+
<h2 id="how-to-get-started">How to Get Started</h2>
79+
<h2 id="create-a-command">Create a Command</h2>
7880
<p>First, install the InEngine.Core package into your own Visual Studio project.</p>
7981
<p><strong>Package Manager</strong></p>
8082
<pre><code class="bash">Install-Package InEngine.Core
@@ -92,38 +94,53 @@ <h2 id="install">Install</h2>
9294
<pre><code class="bash">paket add InEngine.Core
9395
</code></pre>
9496

95-
<p>Second, download the CLI and/or the Scheduler from a release that matches the version of the InEngine.Core package you included.</p>
96-
<p>Releases are found on GitHub: https://github.com/InEngine-NET/InEngine.NET/releases</p>
97-
<h2 id="create-a-command">Create a Command</h2>
98-
<p>Add a class that implements <strong>InEngine.Core.ICommand</strong> or extends <strong>InEngine.Core.AbstractCommand</strong>. </p>
99-
<pre><code class="c#">using InEngine.Core;
97+
<p>Add a class that implements <strong>InEngine.Core.ICommand</strong> or extends <strong>InEngine.Core.AbstractCommand</strong>.
98+
The <strong>AbstractCommand</strong> class adds extra functionality, like a logger, a progress bar, and the ability to schedule the command using the scheduler.
99+
Minimally, the Run method should be overridden.</p>
100+
<pre><code class="csharp">using System;
101+
using InEngine.Core;
100102

101103
namespace MyCommands
102104
{
103105
public class MyCommand : ICommand
104106
{
105107
public CommandResult Run()
106108
{
109+
Console.WriteLine(&quot;Hello, world!&quot;);
107110
return new CommandResult(true);
108111
}
109112
}
110113
}
111114
</code></pre>
112115

113-
<p>The <strong>AbstractCommand</strong> class adds extra functionality, like a logger, a progress bar, and the ability to schedule the command using the scheduler.
114-
Minimally, the Run method should be overridden.</p>
115-
<pre><code class="c#">using InEngine.Core;
116+
<p>Create a class that implements <strong>InEngine.Core.IOptions</strong> in the same assembly as the command class.
117+
Add VerbOptions from the CommandLine namespace.
118+
The help text can be auto-generated or manually specified. </p>
119+
<pre><code class="csharp">using CommandLine;
120+
using CommandLine.Text;
121+
using InEngine.Core;
116122

117-
namespace MyCommands
123+
namespace InEngine.Commands
118124
{
119-
public class MyCommand : AbstractCommand
125+
public class MyOptions : IOptions
120126
{
121-
public override CommandResult Run()
127+
[VerbOption(&quot;my-command&quot;, HelpText=&quot;My example command.&quot;)]
128+
public MyCommand MyCommand { get; set; }
129+
130+
[HelpVerbOption]
131+
public string GetUsage(string verb)
122132
{
123-
return new CommandResult(true);
133+
return HelpText.AutoBuild(this, verb);
124134
}
125135
}
126136
}
137+
</code></pre>
138+
139+
<h1 id="run-the-command">Run the Command</h1>
140+
<p>Second, download the InEngineCli tool that matches the version of the InEngine.Core package you included from the <a href="https://github.com/InEngine-NET/InEngine.NET/releases">GitHub Releases</a> page.</p>
141+
<p>Copy your project's DLLs into the same directory as InEngineCli.exe.</p>
142+
<p>Run your command...</p>
143+
<pre><code class="bash">InEngineCli.exe -pMyCommands my-command
127144
</code></pre></div>
128145
</div>
129146

@@ -164,5 +181,5 @@ <h4 class="modal-title" id="exampleModalLabel">Search</h4>
164181

165182
<!--
166183
MkDocs version : 0.16.3
167-
Build Date UTC : 2017-11-19 21:51:27
184+
Build Date UTC : 2017-11-19 22:09:27
168185
-->

docs/mkdocs/search_index.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"docs": [
33
{
44
"location": "/",
5-
"text": "What is this?\n\n\nInEngine.NET is a background commands processing server. \nIt allows commands to be queued, scheduled, and ran directly. \n\n\nInstall\n\n\nFirst, install the InEngine.Core package 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\nSecond, download the CLI and/or the Scheduler from a release that matches the version of the InEngine.Core package you included.\n\n\nReleases are found on GitHub: https://github.com/InEngine-NET/InEngine.NET/releases\n\n\nCreate a Command\n\n\nAdd a class that implements \nInEngine.Core.ICommand\n or extends \nInEngine.Core.AbstractCommand\n. \n\n\nusing InEngine.Core;\n\nnamespace MyCommands\n{\n public class MyCommand : ICommand\n {\n public CommandResult Run()\n {\n return new CommandResult(true);\n }\n }\n}\n\n\n\n\nThe \nAbstractCommand\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 InEngine.Core;\n\nnamespace MyCommands\n{\n public class MyCommand : AbstractCommand\n {\n public override CommandResult Run()\n {\n return new CommandResult(true);\n }\n }\n}",
5+
"text": "What is this?\n\n\nInEngine.NET is a background commands processing server. \nIt allows commands to be queued, scheduled, and ran directly. \n\n\nHow to Get Started\n\n\nCreate a Command\n\n\nFirst, install the InEngine.Core package 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\nAdd a class that implements \nInEngine.Core.ICommand\n or extends \nInEngine.Core.AbstractCommand\n. \nThe \nAbstractCommand\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 MyCommands\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\nCreate a class that implements \nInEngine.Core.IOptions\n in the same assembly as the command class.\nAdd VerbOptions from the CommandLine namespace.\nThe help text can be auto-generated or manually specified. \n\n\nusing CommandLine;\nusing CommandLine.Text;\nusing InEngine.Core;\n\nnamespace InEngine.Commands\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\nRun the Command\n\n\nSecond, download 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 -pMyCommands my-command",
66
"title": "Getting Started"
77
},
88
{
@@ -11,14 +11,19 @@
1111
"title": "What is this?"
1212
},
1313
{
14-
"location": "/#install",
15-
"text": "First, install the InEngine.Core package 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 Second, download the CLI and/or the Scheduler from a release that matches the version of the InEngine.Core package you included. Releases are found on GitHub: https://github.com/InEngine-NET/InEngine.NET/releases",
16-
"title": "Install"
14+
"location": "/#how-to-get-started",
15+
"text": "",
16+
"title": "How to Get Started"
1717
},
1818
{
1919
"location": "/#create-a-command",
20-
"text": "Add a class that implements InEngine.Core.ICommand or extends InEngine.Core.AbstractCommand . using InEngine.Core;\n\nnamespace MyCommands\n{\n public class MyCommand : ICommand\n {\n public CommandResult Run()\n {\n return new CommandResult(true);\n }\n }\n} The 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 InEngine.Core;\n\nnamespace MyCommands\n{\n public class MyCommand : AbstractCommand\n {\n public override CommandResult Run()\n {\n return new CommandResult(true);\n }\n }\n}",
20+
"text": "First, install the InEngine.Core package 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 Add a class that implements InEngine.Core.ICommand or extends InEngine.Core.AbstractCommand . \nThe 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 MyCommands\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} Create a class that implements InEngine.Core.IOptions in the same assembly as the command class.\nAdd VerbOptions from the CommandLine namespace.\nThe help text can be auto-generated or manually specified. using CommandLine;\nusing CommandLine.Text;\nusing InEngine.Core;\n\nnamespace InEngine.Commands\n{\n public class MyOptions : IOptions\n {\n [VerbOption( my-command , HelpText= My example command. )]\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}",
2121
"title": "Create a Command"
22+
},
23+
{
24+
"location": "/#run-the-command",
25+
"text": "Second, download the InEngineCli tool that matches the version of the InEngine.Core package you included from the GitHub Releases page. Copy your project's DLLs into the same directory as InEngineCli.exe. Run your command... InEngineCli.exe -pMyCommands my-command",
26+
"title": "Run the Command"
2227
}
2328
]
2429
}

0 commit comments

Comments
 (0)