You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-src/commands.md
+94-62Lines changed: 94 additions & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,8 @@ namespace MyCommandPlugin
44
44
}
45
45
```
46
46
47
-
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.
47
+
A command that implements ICommand can be run directly or [queued](queuing), but it cannot be [scheduled](scheduling).
48
+
Extending the **InEngine.Core.AbstractCommand** class adds extra functionality, like a progress bar, and the ability to schedule the command using the scheduler.
48
49
Minimally, the Run method should be overridden.
49
50
50
51
```c#
@@ -63,12 +64,12 @@ namespace MyCommandPlugin
63
64
}
64
65
```
65
66
66
-
67
67
## Run a Command
68
68
69
69
Create a class that implements **InEngine.Core.IOptions** in the same assembly as the command class.
70
-
Add a VerbOptions attribute from the CommandLine namespace that defines the name of the command and optional help text.
71
-
The help text can be auto-generated from the attribute or manually specified in the GetUsage method.
70
+
Add a VerbOptions attribute, from the CommandLine namespace, that defines the name of the command.
71
+
Optional help text can also be specified in the VerbOption attribute.
72
+
The help text can be auto-generated from the attribute or manually specified in the GetUsage method if desired.
72
73
73
74
```c#
74
75
usingCommandLine;
@@ -93,20 +94,30 @@ namespace MyCommandPlugin
93
94
94
95
Download the InEngine binary distribution, from the [GitHub Releases](https://github.com/InEngine-NET/InEngine.NET/releases) page, that matches the version of the InEngine.Core package you included.
95
96
96
-
Copy your project's DLLs into the same directory as inengine.exe.
97
+
Copy your project's DLLs into the Plugins subdirectory included in the binary distribution.
98
+
Add your plugin to the ["Plugins" list in appsettings.config](configuration) at the root of the binary distribution.
97
99
98
-
Run your command...
100
+
Run your command:
99
101
100
102
```bash
101
103
inengine.exe -pMyCommandPlugin my-command
102
104
```
103
105
104
-
##Discover Command Plugins
106
+
### Executing Arbitrary Processes
105
107
106
-
Run inengine.exe without any arguments to see a list of plugins.
108
+
It isn't necessary to create C# classes to utilize InEngine.NET.
109
+
Arbitrary commands can be run, with an argument list by leveraging the InEngine.Core plugin's **proc** command.
110
+
The command lists directory contents using "ls" with the "-lhp" switches:
0 commit comments