Skip to content

Commit 417a135

Browse files
committed
Do not require .dll for publish command
1 parent 01b77ff commit 417a135

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

docs-src/commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ InEngine 3.x
235235
Copyright © 2017 Ethan Hann
236236
237237
--command-plugin Required. The name of a command plugin file, e.g.
238-
InEngine.Core.dll
238+
InEngine.Core
239239
240240
--command-verb A plugin command verb, e.g. echo
241241

docs-src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Want to queue our example echo command to run in the background or possibly on a
3939
Use the core plugin's **queue:publish** command:
4040

4141
```bash
42-
inengine.exe -pInEngine.Core queue:publish --command-plugin=InEngine.Core.dll --command-verb=echo --args "text=Hello, world"
42+
inengine.exe -pInEngine.Core queue:publish --command-plugin=InEngine.Core --command-verb=echo --args "text=Hello, world"
4343
```
4444

4545
How do we consume that queued echo command?

docs-src/queuing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,19 +158,19 @@ Note that all queue commands reside in the **InEngine.Core** plugin.
158158
This is an example of how to publish a command from the CLI by specifying the command's plugin, class name, and arguments:
159159

160160
```bash
161-
inengine.exe -pInEngine.Core queue:publish --command-plugin=MyCommandPlugin.dll --command-class=MyCommand --args "text=bar"
161+
inengine.exe -pInEngine.Core queue:publish --command-plugin=MyCommandPlugin --command-class=MyCommand --args "text=bar"
162162
```
163163

164164
There is an "Echo" command in the *InEngine.Core* package. It is useful for end-to-end testing with the queue feature.
165165

166166
```bash
167-
inengine.exe -pInEngine.Core queue:publish --command-plugin=InEngine.Core.dll --command-class=InEngine.Core.Commands.Echo --args "text=foo"
167+
inengine.exe -pInEngine.Core queue:publish --command-plugin=InEngine.Core --command-class=InEngine.Core.Commands.Echo --args "text=foo"
168168
```
169169

170170
The command verb can also be specified instead of the full class name:
171171

172172
```bash
173-
inengine.exe -pInEngine.Core queue:publish --command-plugin=InEngine.Core.dll --command-verb=echo--args "text=foo"
173+
inengine.exe -pInEngine.Core queue:publish --command-plugin=InEngine.Core --command-verb=echo--args "text=foo"
174174
```
175175

176176
## Consuming Commands

src/InEngine.Core/Queuing/Commands/Publish.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace InEngine.Core.Queuing.Commands
77
{
88
public class Publish : AbstractCommand
99
{
10-
[Option("command-plugin", Required = true, HelpText = "The name of a command plugin file, e.g. InEngine.Core.dll")]
10+
[Option("command-plugin", Required = true, HelpText = "The name of a command plugin file, e.g. InEngine.Core")]
1111
public string CommandPlugin { get; set; }
1212

1313
[Option("command-verb", HelpText = "A plugin command verb, e.g. echo.")]
@@ -30,7 +30,7 @@ public override void Run()
3030
var command = Command;
3131

3232
if (command == null && !string.IsNullOrWhiteSpace(CommandPlugin)) {
33-
var plugin = PluginAssembly.LoadFrom(CommandPlugin);
33+
var plugin = PluginAssembly.LoadFrom($"{CommandPlugin}.dll");
3434
if (!string.IsNullOrWhiteSpace(CommandClass))
3535
command = plugin.CreateCommandFromClass(CommandClass);
3636
else if (!string.IsNullOrWhiteSpace(CommandVerb)) {

src/InEngine/appsettings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"InEngine": {
33
"Plugins": [
4+
45
],
56
"Mail": {
67
"Host": "localhost",

0 commit comments

Comments
 (0)