BadScript 2
Loading...
Searching...
No Matches
BadOpenFileTerminalCommand.cs
Go to the documentation of this file.
1
namespace
BadScript2.Web.Frontend.Utils
;
2
3
public
class
BadOpenFileTerminalCommand
:
BadTerminalCommand
4
{
5
public
BadOpenFileTerminalCommand
() : base(
"Opens a file"
,
"open"
) { }
6
public
override
Task
Run
(
BadReplContext
context,
string
[] args)
7
{
8
if
(args.Length == 0)
9
{
10
context.
Console
.WriteLine(
"No file specified."
);
11
}
12
else
13
{
14
string
path = args[0];
15
context.
OpenFile
(path);
16
}
17
return
Task.CompletedTask;
18
}
19
}
BadScript2.Web.Frontend.Utils.BadOpenFileTerminalCommand
Definition
BadOpenFileTerminalCommand.cs:4
BadScript2.Web.Frontend.Utils.BadOpenFileTerminalCommand.BadOpenFileTerminalCommand
BadOpenFileTerminalCommand()
Definition
BadOpenFileTerminalCommand.cs:5
BadScript2.Web.Frontend.Utils.BadOpenFileTerminalCommand.Run
override Task Run(BadReplContext context, string[] args)
Definition
BadOpenFileTerminalCommand.cs:6
BadScript2.Web.Frontend.Utils.BadReplContext
Definition
BadReplContext.cs:6
BadScript2.Web.Frontend.Utils.BadReplContext.Console
IBadConsole Console
Definition
BadReplContext.cs:9
BadScript2.Web.Frontend.Utils.BadReplContext.OpenFile
void OpenFile(string file)
BadScript2.Web.Frontend.Utils.BadTerminalCommand
Definition
BadTerminalCommand.cs:4
BadScript2.Web.Frontend.Utils
Definition
BadReplContext.cs:3
web
BadScript2.Web.Frontend
Utils
Terminal
Commands
BadOpenFileTerminalCommand.cs
Generated by
1.9.8